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 fbf95df commit 2909ddeCopy full SHA for 2909dde
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-415/semmle/tests/test.c
@@ -46,21 +46,21 @@ void workFunction_4(char *s) {
46
buf = tmpbuf;
47
free(buf); // GOOD
48
}
49
-void workFunction_5(char *s) {
+void workFunction_5(char *s, int intFlag) {
50
int intSize = 10;
51
char *buf;
52
- int intFlag;
+
53
buf = (char *) malloc(intSize);
54
if(intFlag) {
55
56
57
free(buf); // BAD
58
59
-void workFunction_6(char *s) {
+void workFunction_6(char *s, int intFlag;) {
60
61
62
char *tmpbuf;
63
64
tmpbuf = (char *) malloc(intSize);
65
66
0 commit comments