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) {
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
8888int goodTestf3 (int type, int met) {
@@ -207,7 +207,7 @@ int badTestf10(int type) {
207207}
208208int badTestf11 (int type) {
209209 int is = getSize (type);
210- return 123 / (is - 3 ); // BAD
210+ return 123 / (is - 3 ); // BAD
211211}
212212
213213int 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
You can’t perform that action at this time.
0 commit comments