Skip to content

Commit 9b3ccad

Browse files
authored
Update test.c
1 parent 02eb447 commit 9b3ccad

File tree

1 file changed

+3
-3
lines changed
  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ void workFunction_0(char *s) {
1212
void workFunction_1(char *s) {
1313
int intA,intB;
1414

15-
if(intA + intB) return; // BAD
15+
if(intA + intB) return; // BAD [NOT DETECTED]
1616
if(intA + intB>4) return; // GOOD
17-
if(intA>0 && (intA + intB)) return; // BAD
17+
if(intA>0 && (intA + intB)) return; // BAD [NOT DETECTED]
1818
while(intA>0)
1919
{
2020
if(intB - intA<10) break;
2121
intA--;
22-
}while(intA>0); // BAD
22+
}while(intA>0); // BAD [NOT DETECTED]
2323
while(intA>0)
2424
{
2525
if(intB - intA<10) break;

0 commit comments

Comments
 (0)