Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef57861 commit 187299fCopy full SHA for 187299f
1 file changed
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-190/IfStatementAdditionOverflow/test.cpp
@@ -57,4 +57,7 @@ void test()
57
if (a+b>c) { b++; a = c-b; } // GOOD
58
if (a+d>c) a = c-d; // GOOD
59
if (a1+b1>c1) a1 = c1-b1; // GOOD
60
+
61
+ if (a+b<=c) { /* ... */ } else { a = c-b; } // BAD
62
+ if (a+b<=c) { return; } a = c-b; // BAD
63
}
0 commit comments