Skip to content

Commit 92c9a8e

Browse files
authored
Update cpp/ql/test/query-tests/Security/CWE/CWE-468/semmle/SuspiciousAddWithSizeof/buildless.cpp
1 parent 21cb11e commit 92c9a8e

File tree

1 file changed

+1
-1
lines changed
  • cpp/ql/test/query-tests/Security/CWE/CWE-468/semmle/SuspiciousAddWithSizeof

1 file changed

+1
-1
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-468/semmle/SuspiciousAddWithSizeof/buildless.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ void test_buildless(const char *p_c, const short *p_short, const int *p_int, con
44
*(p_c + sizeof(int)); // GOOD (`sizeof(char)` is 1)
55
*(p_short + sizeof(int)); // BAD
66
*(p_int + sizeof(int)); // BAD
7-
*(p_8 + sizeof(int)); // GOOD (`sizeof(p_8)` is 1, but there's an error in the type)
7+
*(p_8 + sizeof(int)); // GOOD (`sizeof(uint8_t)` is 1, but there's an error in the type)
88
*(p_16 + sizeof(int)); // BAD [NOT DETECTED]
99
*(p_32 + sizeof(int)); // BAD [NOT DETECTED]
1010
}

0 commit comments

Comments
 (0)