File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-369/semmle/tests Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ int badTestf3(int type, int met) {
58
58
is = getSize (type);
59
59
switch (met) {
60
60
case 1 :
61
- if (is >= 0 ) return 123 / is; // BAD
61
+ if (is >= 0 ) return 123 / is; // BAD [NOT DETECTED]
62
62
case 2 :
63
- if (0 == is) return 123 / is; // BAD
63
+ if (0 == is) return 123 / is; // BAD [NOT DETECTED]
64
64
case 3 :
65
65
if (!is & 123 / is) // BAD
66
66
return 123 ;
@@ -82,7 +82,7 @@ int badTestf3(int type, int met) {
82
82
}
83
83
if (is != 0 ) return -1 ;
84
84
if (is == 0 ) type += 1 ;
85
- return 123 / is; // BAD
85
+ return 123 / is; // BAD [NOT DETECTED]
86
86
}
87
87
88
88
int goodTestf3 (int type, int met) {
@@ -207,7 +207,7 @@ int badTestf10(int type) {
207
207
}
208
208
int badTestf11 (int type) {
209
209
int is = getSize (type);
210
- return 123 / (is - 3 ); // BAD
210
+ return 123 / (is - 3 ); // BAD
211
211
}
212
212
213
213
int goodTestf11 (int type) {
@@ -223,7 +223,7 @@ int badTestf12(FILE * f) {
223
223
int a;
224
224
int ret = -1 ;
225
225
a = getc (f);
226
- if (a == 0 ) ret = 123 / a; // BAD
226
+ if (a == 0 ) ret = 123 / a; // BAD [NOT DETECTED]
227
227
return ret;
228
228
}
229
229
You can’t perform that action at this time.
0 commit comments