Skip to content

Commit 2de0e22

Browse files
authored
Update test.cpp
1 parent a2b5fbf commit 2de0e22

File tree

1 file changed

+1
-0
lines changed
  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-190/IfStatementAdditionOverflow

1 file changed

+1
-0
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-190/IfStatementAdditionOverflow/test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void test()
5252
if (c<=b+a) { a = c-b; } // BAD
5353

5454
if (a+b>d) a = d-b; // BAD
55+
if (a+(double)b>c) a = c-b; // GOOD
5556
if (a+(-x)>c) a = c-(-y); // GOOD
5657
if (a+b>c) { b++; a = c-b; } // GOOD
5758
if (a+d>c) a = c-d; // GOOD

0 commit comments

Comments
 (0)