We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21cb11e commit 92c9a8eCopy full SHA for 92c9a8e
1 file changed
cpp/ql/test/query-tests/Security/CWE/CWE-468/semmle/SuspiciousAddWithSizeof/buildless.cpp
@@ -4,7 +4,7 @@ void test_buildless(const char *p_c, const short *p_short, const int *p_int, con
4
*(p_c + sizeof(int)); // GOOD (`sizeof(char)` is 1)
5
*(p_short + sizeof(int)); // BAD
6
*(p_int + sizeof(int)); // BAD
7
- *(p_8 + sizeof(int)); // GOOD (`sizeof(p_8)` is 1, but there's an error in the type)
+ *(p_8 + sizeof(int)); // GOOD (`sizeof(uint8_t)` is 1, but there's an error in the type)
8
*(p_16 + sizeof(int)); // BAD [NOT DETECTED]
9
*(p_32 + sizeof(int)); // BAD [NOT DETECTED]
10
}
0 commit comments