Skip to content

Commit 36131ee

Browse files
authored
Update test.cpp
1 parent 2d1924a commit 36131ee

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
void testFunction(int i1, int i2, int i3, bool b1, bool b2, bool b3, char c1)
22
{
3-
4-
5-
63

74
if(b1||b2&&b3) //BAD
85
return;
@@ -15,6 +12,10 @@ void testFunction(int i1, int i2, int i3, bool b1, bool b2, bool b3, char c1)
1512
return;
1613
if((b1||b2)&i1) //GOOD
1714
return;
15+
if(b1||b2&1) //GOOD
16+
return;
17+
if(b1&&b2&0) //GOOD
18+
return;
1819
if(b1||b2|i1) //BAD
1920
return;
2021
if((b1||b2)|i1) //GOOD

0 commit comments

Comments
 (0)