Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a57f81 commit 023b8e4Copy full SHA for 023b8e4
1 file changed
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-119/test.cpp
@@ -243,3 +243,9 @@ void test_flow_through_setter(unsigned size) {
243
memset(str.string, 0, size + 1); // BAD
244
}
245
246
+void* my_alloc(unsigned size);
247
+
248
+void foo(unsigned size) {
249
+ int* p = (int*)my_alloc(size); // BAD [NOT DETECTED]
250
+ memset(p, 0, size + 1);
251
+}
0 commit comments