Skip to content

Commit d6618ed

Browse files
committed
C++: Accept test changes.
1 parent f7392d6 commit d6618ed

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-129/semmle/ImproperArrayIndexValidation/ImproperArrayIndexValidation.expected

-6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ edges
1313
| test1.c:42:16:42:16 | i | test1.c:43:11:43:11 | i | provenance | |
1414
| test1.c:50:16:50:16 | i | test1.c:53:3:53:7 | ... = ... | provenance | |
1515
| test1.c:53:3:53:7 | ... = ... | test1.c:55:15:55:15 | j | provenance | |
16-
| test1.c:76:11:76:23 | ... = ... | test1.c:77:20:77:21 | ch | provenance | |
17-
| test1.c:76:16:76:19 | call to getc | test1.c:76:11:76:23 | ... = ... | provenance | |
1816
nodes
1917
| test1.c:7:26:7:29 | **argv | semmle.label | **argv |
2018
| test1.c:8:11:8:14 | call to atoi | semmle.label | call to atoi |
@@ -31,13 +29,9 @@ nodes
3129
| test1.c:50:16:50:16 | i | semmle.label | i |
3230
| test1.c:53:3:53:7 | ... = ... | semmle.label | ... = ... |
3331
| test1.c:55:15:55:15 | j | semmle.label | j |
34-
| test1.c:76:11:76:23 | ... = ... | semmle.label | ... = ... |
35-
| test1.c:76:16:76:19 | call to getc | semmle.label | call to getc |
36-
| test1.c:77:20:77:21 | ch | semmle.label | ch |
3732
subpaths
3833
#select
3934
| test1.c:20:16:20:16 | i | test1.c:7:26:7:29 | **argv | test1.c:20:16:20:16 | i | An array indexing expression depends on $@ that might be outside the bounds of the array. | test1.c:7:26:7:29 | **argv | a command-line argument |
4035
| test1.c:35:11:35:11 | i | test1.c:7:26:7:29 | **argv | test1.c:35:11:35:11 | i | An array indexing expression depends on $@ that might be outside the bounds of the array. | test1.c:7:26:7:29 | **argv | a command-line argument |
4136
| test1.c:43:11:43:11 | i | test1.c:7:26:7:29 | **argv | test1.c:43:11:43:11 | i | An array indexing expression depends on $@ that might be outside the bounds of the array. | test1.c:7:26:7:29 | **argv | a command-line argument |
4237
| test1.c:55:15:55:15 | j | test1.c:7:26:7:29 | **argv | test1.c:55:15:55:15 | j | An array indexing expression depends on $@ that might be outside the bounds of the array. | test1.c:7:26:7:29 | **argv | a command-line argument |
43-
| test1.c:77:20:77:21 | ch | test1.c:76:16:76:19 | call to getc | test1.c:77:20:77:21 | ch | An array indexing expression depends on $@ that might be outside the bounds of the array. | test1.c:76:16:76:19 | call to getc | external |

cpp/ql/test/query-tests/Security/CWE/CWE-129/semmle/ImproperArrayIndexValidation/test1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ extern int myMaxCharTable[256];
7373
void test7(FILE* fp) {
7474
int ch;
7575
while ((ch = getc(fp)) != EOF) {
76-
myMaxCharTable[ch] = 0; // GOOD [FALSE POSITIVE]
76+
myMaxCharTable[ch] = 0; // GOOD
7777
}
7878
}
7979

0 commit comments

Comments
 (0)