Skip to content

Commit 5e23615

Browse files
authored
Update test.cpp
1 parent 8335778 commit 5e23615

File tree

1 file changed

+5
-1
lines changed
  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-754/semmle/tests

1 file changed

+5
-1
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-754/semmle/tests/test.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int functionWork1b(int retIndex) {
5959
}
6060
int functionWork1_() {
6161
int i;
62-
scanf("%i",&i); // GOOD
62+
scanf("%i",&i); // BAD [NOT DETECTED]
6363
if(i<10)
6464
return -1;
6565
return i;
@@ -115,3 +115,7 @@ int functionWork2b_() {
115115
globalVala2 = a[0];
116116
return 0;
117117
}
118+
int functionWork3b(int i) {
119+
scanf("%i", &i); // BAD
120+
return 0;
121+
}

0 commit comments

Comments
 (0)