Skip to content

Commit 54acbf7

Browse files
authored
Update test.cpp
1 parent 49af5ec commit 54acbf7

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ int badTestf3(int type, int met) {
5858
is = getSize(type);
5959
switch (met) {
6060
case 1:
61-
if (is >= 0) return 123 / is; // BAD
61+
if (is >= 0) return 123 / is; // BAD [NOT DETECTED]
6262
case 2:
63-
if (0 == is) return 123 / is; // BAD
63+
if (0 == is) return 123 / is; // BAD [NOT DETECTED]
6464
case 3:
6565
if (!is & 123 / is) // BAD
6666
return 123;
@@ -82,7 +82,7 @@ int badTestf3(int type, int met) {
8282
}
8383
if (is != 0) return -1;
8484
if (is == 0) type += 1;
85-
return 123 / is; // BAD
85+
return 123 / is; // BAD [NOT DETECTED]
8686
}
8787

8888
int goodTestf3(int type, int met) {
@@ -207,7 +207,7 @@ int badTestf10(int type) {
207207
}
208208
int badTestf11(int type) {
209209
int is = getSize(type);
210-
return 123 / (is - 3); // BAD
210+
return 123 / (is - 3); // BAD
211211
}
212212

213213
int goodTestf11(int type) {
@@ -223,7 +223,7 @@ int badTestf12(FILE * f) {
223223
int a;
224224
int ret = -1;
225225
a = getc(f);
226-
if (a == 0) ret = 123 / a; // BAD
226+
if (a == 0) ret = 123 / a; // BAD [NOT DETECTED]
227227
return ret;
228228
}
229229

0 commit comments

Comments
 (0)