Skip to content

Commit 823d5ac

Browse files
committed
C++: Spacing.
1 parent 8bb21e1 commit 823d5ac

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ edges
44
| test1.c:8:11:8:14 | call to atoi | test1.c:11:9:11:9 | i | provenance | |
55
| test1.c:8:11:8:14 | call to atoi | test1.c:12:9:12:9 | i | provenance | |
66
| test1.c:8:11:8:14 | call to atoi | test1.c:13:9:13:9 | i | provenance | |
7-
| test1.c:9:9:9:9 | i | test1.c:17:16:17:16 | i | provenance | |
8-
| test1.c:11:9:11:9 | i | test1.c:33:16:33:16 | i | provenance | |
9-
| test1.c:12:9:12:9 | i | test1.c:41:16:41:16 | i | provenance | |
10-
| test1.c:13:9:13:9 | i | test1.c:49:16:49:16 | i | provenance | |
11-
| test1.c:17:16:17:16 | i | test1.c:19:16:19:16 | i | provenance | |
12-
| test1.c:33:16:33:16 | i | test1.c:34:11:34:11 | i | provenance | |
13-
| test1.c:41:16:41:16 | i | test1.c:42:11:42:11 | i | provenance | |
14-
| test1.c:49:16:49:16 | i | test1.c:52:3:52:7 | ... = ... | provenance | |
15-
| test1.c:52:3:52:7 | ... = ... | test1.c:54:15:54:15 | j | provenance | |
7+
| test1.c:9:9:9:9 | i | test1.c:18:16:18:16 | i | provenance | |
8+
| test1.c:11:9:11:9 | i | test1.c:34:16:34:16 | i | provenance | |
9+
| test1.c:12:9:12:9 | i | test1.c:42:16:42:16 | i | provenance | |
10+
| test1.c:13:9:13:9 | i | test1.c:50:16:50:16 | i | provenance | |
11+
| test1.c:18:16:18:16 | i | test1.c:20:16:20:16 | i | provenance | |
12+
| test1.c:34:16:34:16 | i | test1.c:35:11:35:11 | i | provenance | |
13+
| test1.c:42:16:42:16 | i | test1.c:43:11:43:11 | i | provenance | |
14+
| test1.c:50:16:50:16 | i | test1.c:53:3:53:7 | ... = ... | provenance | |
15+
| test1.c:53:3:53:7 | ... = ... | test1.c:55:15:55:15 | j | provenance | |
1616
nodes
1717
| test1.c:7:26:7:29 | **argv | semmle.label | **argv |
1818
| test1.c:8:11:8:14 | call to atoi | semmle.label | call to atoi |
1919
| test1.c:9:9:9:9 | i | semmle.label | i |
2020
| test1.c:11:9:11:9 | i | semmle.label | i |
2121
| test1.c:12:9:12:9 | i | semmle.label | i |
2222
| test1.c:13:9:13:9 | i | semmle.label | i |
23-
| test1.c:17:16:17:16 | i | semmle.label | i |
24-
| test1.c:19:16:19:16 | i | semmle.label | i |
25-
| test1.c:33:16:33:16 | i | semmle.label | i |
26-
| test1.c:34:11:34:11 | i | semmle.label | i |
27-
| test1.c:41:16:41:16 | i | semmle.label | i |
28-
| test1.c:42:11:42:11 | i | semmle.label | i |
29-
| test1.c:49:16:49:16 | i | semmle.label | i |
30-
| test1.c:52:3:52:7 | ... = ... | semmle.label | ... = ... |
31-
| test1.c:54:15:54:15 | j | semmle.label | j |
23+
| test1.c:18:16:18:16 | i | semmle.label | i |
24+
| test1.c:20:16:20:16 | i | semmle.label | i |
25+
| test1.c:34:16:34:16 | i | semmle.label | i |
26+
| test1.c:35:11:35:11 | i | semmle.label | i |
27+
| test1.c:42:16:42:16 | i | semmle.label | i |
28+
| test1.c:43:11:43:11 | i | semmle.label | i |
29+
| test1.c:50:16:50:16 | i | semmle.label | i |
30+
| test1.c:53:3:53:7 | ... = ... | semmle.label | ... = ... |
31+
| test1.c:55:15:55:15 | j | semmle.label | j |
3232
subpaths
3333
#select
34-
| test1.c:19:16:19:16 | i | test1.c:7:26:7:29 | **argv | test1.c:19:16:19: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 |
35-
| test1.c:34:11:34:11 | i | test1.c:7:26:7:29 | **argv | test1.c:34:11:34: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 |
36-
| test1.c:42:11:42:11 | i | test1.c:7:26:7:29 | **argv | test1.c:42:11:42: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 |
37-
| test1.c:54:15:54:15 | j | test1.c:7:26:7:29 | **argv | test1.c:54:15:54: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 |
34+
| 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 |
35+
| 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 |
36+
| 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 |
37+
| 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 |

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ int main(int argc, char *argv[]) {
1212
test4(i);
1313
test5(i);
1414
test6(i);
15+
test7(argv[1]);
1516
}
1617

1718
void test1(int i) {
@@ -60,4 +61,6 @@ void test6(int i) {
6061
unsigned char s = i;
6162

6263
myTable[s] = 0; // GOOD: Input is small [FALSE POSITIVE]
63-
}
64+
}
65+
66+
void test7(char *s) { }

0 commit comments

Comments
 (0)