We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50abb6e commit 1e32728Copy full SHA for 1e32728
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/test.c
@@ -39,6 +39,13 @@ struct buffers
39
unsigned char *pointer;
40
} globalBuff1,*globalBuff2,globalBuff1_c,*globalBuff2_c;
41
42
+void strncat_test5(char* s, struct buffers* buffers) {
43
+ unsigned len_array = strlen(buffers->array);
44
+ unsigned max_size = sizeof(buffers->array);
45
+ unsigned free_size = max_size - len_array;
46
+ strncat(buffers->array, s, free_size); // BAD [NOT DETECTED]
47
+}
48
+
49
void strlen_test1(){
50
unsigned char buff1[12];
51
struct buffers buffAll;
0 commit comments