Skip to content

Commit 61e30b9

Browse files
committed
C++: Accept more test changes.
1 parent 368f438 commit 61e30b9

File tree

5 files changed

+68
-68
lines changed

5 files changed

+68
-68
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
edges
2-
| test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath indirection |
2+
| test.cpp:22:27:22:30 | **argv | test.cpp:29:13:29:20 | *filePath |
33
nodes
4-
| test.cpp:22:27:22:30 | argv indirection | semmle.label | argv indirection |
5-
| test.cpp:29:13:29:20 | filePath indirection | semmle.label | filePath indirection |
4+
| test.cpp:22:27:22:30 | **argv | semmle.label | **argv |
5+
| test.cpp:29:13:29:20 | *filePath | semmle.label | *filePath |
66
subpaths
77
#select
8-
| test.cpp:29:13:29:20 | filePath indirection | test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath indirection | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. |
8+
| test.cpp:29:13:29:20 | *filePath | test.cpp:22:27:22:30 | **argv | test.cpp:29:13:29:20 | *filePath | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/array-access/ArrayAccessProductFlow.expected

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
11
edges
22
| test.cpp:4:17:4:22 | call to malloc | test.cpp:6:9:6:11 | arr |
33
| test.cpp:4:17:4:22 | call to malloc | test.cpp:10:9:10:11 | arr |
4-
| test.cpp:19:9:19:16 | mk_array indirection [p] | test.cpp:28:19:28:26 | call to mk_array [p] |
5-
| test.cpp:19:9:19:16 | mk_array indirection [p] | test.cpp:50:18:50:25 | call to mk_array [p] |
6-
| test.cpp:21:5:21:7 | arr indirection [post update] [p] | test.cpp:22:5:22:7 | arr indirection [p] |
7-
| test.cpp:21:5:21:24 | ... = ... | test.cpp:21:5:21:7 | arr indirection [post update] [p] |
4+
| test.cpp:19:9:19:16 | *mk_array [p] | test.cpp:28:19:28:26 | call to mk_array [p] |
5+
| test.cpp:19:9:19:16 | *mk_array [p] | test.cpp:50:18:50:25 | call to mk_array [p] |
6+
| test.cpp:21:5:21:7 | *arr [post update] [p] | test.cpp:22:5:22:7 | *arr [p] |
7+
| test.cpp:21:5:21:24 | ... = ... | test.cpp:21:5:21:7 | *arr [post update] [p] |
88
| test.cpp:21:13:21:18 | call to malloc | test.cpp:21:5:21:24 | ... = ... |
9-
| test.cpp:22:5:22:7 | arr indirection [p] | test.cpp:19:9:19:16 | mk_array indirection [p] |
10-
| test.cpp:28:19:28:26 | call to mk_array [p] | test.cpp:31:9:31:11 | arr indirection [p] |
11-
| test.cpp:28:19:28:26 | call to mk_array [p] | test.cpp:35:9:35:11 | arr indirection [p] |
12-
| test.cpp:31:9:31:11 | arr indirection [p] | test.cpp:31:13:31:13 | p |
13-
| test.cpp:35:9:35:11 | arr indirection [p] | test.cpp:35:13:35:13 | p |
14-
| test.cpp:39:27:39:29 | arr [p] | test.cpp:41:9:41:11 | arr indirection [p] |
15-
| test.cpp:39:27:39:29 | arr [p] | test.cpp:45:9:45:11 | arr indirection [p] |
16-
| test.cpp:41:9:41:11 | arr indirection [p] | test.cpp:41:13:41:13 | p |
17-
| test.cpp:45:9:45:11 | arr indirection [p] | test.cpp:45:13:45:13 | p |
9+
| test.cpp:22:5:22:7 | *arr [p] | test.cpp:19:9:19:16 | *mk_array [p] |
10+
| test.cpp:28:19:28:26 | call to mk_array [p] | test.cpp:31:9:31:11 | *arr [p] |
11+
| test.cpp:28:19:28:26 | call to mk_array [p] | test.cpp:35:9:35:11 | *arr [p] |
12+
| test.cpp:31:9:31:11 | *arr [p] | test.cpp:31:13:31:13 | p |
13+
| test.cpp:35:9:35:11 | *arr [p] | test.cpp:35:13:35:13 | p |
14+
| test.cpp:39:27:39:29 | arr [p] | test.cpp:41:9:41:11 | *arr [p] |
15+
| test.cpp:39:27:39:29 | arr [p] | test.cpp:45:9:45:11 | *arr [p] |
16+
| test.cpp:41:9:41:11 | *arr [p] | test.cpp:41:13:41:13 | p |
17+
| test.cpp:45:9:45:11 | *arr [p] | test.cpp:45:13:45:13 | p |
1818
| test.cpp:50:18:50:25 | call to mk_array [p] | test.cpp:39:27:39:29 | arr [p] |
19-
| test.cpp:55:5:55:7 | arr indirection [post update] [p] | test.cpp:56:5:56:7 | arr indirection [p] |
20-
| test.cpp:55:5:55:24 | ... = ... | test.cpp:55:5:55:7 | arr indirection [post update] [p] |
19+
| test.cpp:55:5:55:7 | *arr [post update] [p] | test.cpp:56:5:56:7 | *arr [p] |
20+
| test.cpp:55:5:55:24 | ... = ... | test.cpp:55:5:55:7 | *arr [post update] [p] |
2121
| test.cpp:55:13:55:18 | call to malloc | test.cpp:55:5:55:24 | ... = ... |
22-
| test.cpp:56:5:56:7 | arr indirection [p] | test.cpp:59:9:59:11 | arr indirection [p] |
23-
| test.cpp:56:5:56:7 | arr indirection [p] | test.cpp:63:9:63:11 | arr indirection [p] |
24-
| test.cpp:59:9:59:11 | arr indirection [p] | test.cpp:59:13:59:13 | p |
25-
| test.cpp:63:9:63:11 | arr indirection [p] | test.cpp:63:13:63:13 | p |
26-
| test.cpp:67:10:67:19 | mk_array_p indirection [p] | test.cpp:76:20:76:29 | call to mk_array_p indirection [p] |
27-
| test.cpp:67:10:67:19 | mk_array_p indirection [p] | test.cpp:98:18:98:27 | call to mk_array_p indirection [p] |
28-
| test.cpp:69:5:69:7 | arr indirection [post update] [p] | test.cpp:70:5:70:7 | arr indirection [p] |
29-
| test.cpp:69:5:69:25 | ... = ... | test.cpp:69:5:69:7 | arr indirection [post update] [p] |
22+
| test.cpp:56:5:56:7 | *arr [p] | test.cpp:59:9:59:11 | *arr [p] |
23+
| test.cpp:56:5:56:7 | *arr [p] | test.cpp:63:9:63:11 | *arr [p] |
24+
| test.cpp:59:9:59:11 | *arr [p] | test.cpp:59:13:59:13 | p |
25+
| test.cpp:63:9:63:11 | *arr [p] | test.cpp:63:13:63:13 | p |
26+
| test.cpp:67:10:67:19 | **mk_array_p [p] | test.cpp:76:20:76:29 | *call to mk_array_p [p] |
27+
| test.cpp:67:10:67:19 | **mk_array_p [p] | test.cpp:98:18:98:27 | *call to mk_array_p [p] |
28+
| test.cpp:69:5:69:7 | *arr [post update] [p] | test.cpp:70:5:70:7 | *arr [p] |
29+
| test.cpp:69:5:69:25 | ... = ... | test.cpp:69:5:69:7 | *arr [post update] [p] |
3030
| test.cpp:69:14:69:19 | call to malloc | test.cpp:69:5:69:25 | ... = ... |
31-
| test.cpp:70:5:70:7 | arr indirection [p] | test.cpp:67:10:67:19 | mk_array_p indirection [p] |
32-
| test.cpp:76:20:76:29 | call to mk_array_p indirection [p] | test.cpp:79:9:79:11 | arr indirection [p] |
33-
| test.cpp:76:20:76:29 | call to mk_array_p indirection [p] | test.cpp:83:9:83:11 | arr indirection [p] |
34-
| test.cpp:79:9:79:11 | arr indirection [p] | test.cpp:79:14:79:14 | p |
35-
| test.cpp:83:9:83:11 | arr indirection [p] | test.cpp:83:14:83:14 | p |
36-
| test.cpp:87:28:87:30 | arr indirection [p] | test.cpp:89:9:89:11 | arr indirection [p] |
37-
| test.cpp:87:28:87:30 | arr indirection [p] | test.cpp:93:9:93:11 | arr indirection [p] |
38-
| test.cpp:89:9:89:11 | arr indirection [p] | test.cpp:89:14:89:14 | p |
39-
| test.cpp:93:9:93:11 | arr indirection [p] | test.cpp:93:14:93:14 | p |
40-
| test.cpp:98:18:98:27 | call to mk_array_p indirection [p] | test.cpp:87:28:87:30 | arr indirection [p] |
31+
| test.cpp:70:5:70:7 | *arr [p] | test.cpp:67:10:67:19 | **mk_array_p [p] |
32+
| test.cpp:76:20:76:29 | *call to mk_array_p [p] | test.cpp:79:9:79:11 | *arr [p] |
33+
| test.cpp:76:20:76:29 | *call to mk_array_p [p] | test.cpp:83:9:83:11 | *arr [p] |
34+
| test.cpp:79:9:79:11 | *arr [p] | test.cpp:79:14:79:14 | p |
35+
| test.cpp:83:9:83:11 | *arr [p] | test.cpp:83:14:83:14 | p |
36+
| test.cpp:87:28:87:30 | *arr [p] | test.cpp:89:9:89:11 | *arr [p] |
37+
| test.cpp:87:28:87:30 | *arr [p] | test.cpp:93:9:93:11 | *arr [p] |
38+
| test.cpp:89:9:89:11 | *arr [p] | test.cpp:89:14:89:14 | p |
39+
| test.cpp:93:9:93:11 | *arr [p] | test.cpp:93:14:93:14 | p |
40+
| test.cpp:98:18:98:27 | *call to mk_array_p [p] | test.cpp:87:28:87:30 | *arr [p] |
4141
nodes
4242
| test.cpp:4:17:4:22 | call to malloc | semmle.label | call to malloc |
4343
| test.cpp:6:9:6:11 | arr | semmle.label | arr |
4444
| test.cpp:10:9:10:11 | arr | semmle.label | arr |
45-
| test.cpp:19:9:19:16 | mk_array indirection [p] | semmle.label | mk_array indirection [p] |
46-
| test.cpp:21:5:21:7 | arr indirection [post update] [p] | semmle.label | arr indirection [post update] [p] |
45+
| test.cpp:19:9:19:16 | *mk_array [p] | semmle.label | *mk_array [p] |
46+
| test.cpp:21:5:21:7 | *arr [post update] [p] | semmle.label | *arr [post update] [p] |
4747
| test.cpp:21:5:21:24 | ... = ... | semmle.label | ... = ... |
4848
| test.cpp:21:13:21:18 | call to malloc | semmle.label | call to malloc |
49-
| test.cpp:22:5:22:7 | arr indirection [p] | semmle.label | arr indirection [p] |
49+
| test.cpp:22:5:22:7 | *arr [p] | semmle.label | *arr [p] |
5050
| test.cpp:28:19:28:26 | call to mk_array [p] | semmle.label | call to mk_array [p] |
51-
| test.cpp:31:9:31:11 | arr indirection [p] | semmle.label | arr indirection [p] |
51+
| test.cpp:31:9:31:11 | *arr [p] | semmle.label | *arr [p] |
5252
| test.cpp:31:13:31:13 | p | semmle.label | p |
53-
| test.cpp:35:9:35:11 | arr indirection [p] | semmle.label | arr indirection [p] |
53+
| test.cpp:35:9:35:11 | *arr [p] | semmle.label | *arr [p] |
5454
| test.cpp:35:13:35:13 | p | semmle.label | p |
5555
| test.cpp:39:27:39:29 | arr [p] | semmle.label | arr [p] |
56-
| test.cpp:41:9:41:11 | arr indirection [p] | semmle.label | arr indirection [p] |
56+
| test.cpp:41:9:41:11 | *arr [p] | semmle.label | *arr [p] |
5757
| test.cpp:41:13:41:13 | p | semmle.label | p |
58-
| test.cpp:45:9:45:11 | arr indirection [p] | semmle.label | arr indirection [p] |
58+
| test.cpp:45:9:45:11 | *arr [p] | semmle.label | *arr [p] |
5959
| test.cpp:45:13:45:13 | p | semmle.label | p |
6060
| test.cpp:50:18:50:25 | call to mk_array [p] | semmle.label | call to mk_array [p] |
61-
| test.cpp:55:5:55:7 | arr indirection [post update] [p] | semmle.label | arr indirection [post update] [p] |
61+
| test.cpp:55:5:55:7 | *arr [post update] [p] | semmle.label | *arr [post update] [p] |
6262
| test.cpp:55:5:55:24 | ... = ... | semmle.label | ... = ... |
6363
| test.cpp:55:13:55:18 | call to malloc | semmle.label | call to malloc |
64-
| test.cpp:56:5:56:7 | arr indirection [p] | semmle.label | arr indirection [p] |
65-
| test.cpp:59:9:59:11 | arr indirection [p] | semmle.label | arr indirection [p] |
64+
| test.cpp:56:5:56:7 | *arr [p] | semmle.label | *arr [p] |
65+
| test.cpp:59:9:59:11 | *arr [p] | semmle.label | *arr [p] |
6666
| test.cpp:59:13:59:13 | p | semmle.label | p |
67-
| test.cpp:63:9:63:11 | arr indirection [p] | semmle.label | arr indirection [p] |
67+
| test.cpp:63:9:63:11 | *arr [p] | semmle.label | *arr [p] |
6868
| test.cpp:63:13:63:13 | p | semmle.label | p |
69-
| test.cpp:67:10:67:19 | mk_array_p indirection [p] | semmle.label | mk_array_p indirection [p] |
70-
| test.cpp:69:5:69:7 | arr indirection [post update] [p] | semmle.label | arr indirection [post update] [p] |
69+
| test.cpp:67:10:67:19 | **mk_array_p [p] | semmle.label | **mk_array_p [p] |
70+
| test.cpp:69:5:69:7 | *arr [post update] [p] | semmle.label | *arr [post update] [p] |
7171
| test.cpp:69:5:69:25 | ... = ... | semmle.label | ... = ... |
7272
| test.cpp:69:14:69:19 | call to malloc | semmle.label | call to malloc |
73-
| test.cpp:70:5:70:7 | arr indirection [p] | semmle.label | arr indirection [p] |
74-
| test.cpp:76:20:76:29 | call to mk_array_p indirection [p] | semmle.label | call to mk_array_p indirection [p] |
75-
| test.cpp:79:9:79:11 | arr indirection [p] | semmle.label | arr indirection [p] |
73+
| test.cpp:70:5:70:7 | *arr [p] | semmle.label | *arr [p] |
74+
| test.cpp:76:20:76:29 | *call to mk_array_p [p] | semmle.label | *call to mk_array_p [p] |
75+
| test.cpp:79:9:79:11 | *arr [p] | semmle.label | *arr [p] |
7676
| test.cpp:79:14:79:14 | p | semmle.label | p |
77-
| test.cpp:83:9:83:11 | arr indirection [p] | semmle.label | arr indirection [p] |
77+
| test.cpp:83:9:83:11 | *arr [p] | semmle.label | *arr [p] |
7878
| test.cpp:83:14:83:14 | p | semmle.label | p |
79-
| test.cpp:87:28:87:30 | arr indirection [p] | semmle.label | arr indirection [p] |
80-
| test.cpp:89:9:89:11 | arr indirection [p] | semmle.label | arr indirection [p] |
79+
| test.cpp:87:28:87:30 | *arr [p] | semmle.label | *arr [p] |
80+
| test.cpp:89:9:89:11 | *arr [p] | semmle.label | *arr [p] |
8181
| test.cpp:89:14:89:14 | p | semmle.label | p |
82-
| test.cpp:93:9:93:11 | arr indirection [p] | semmle.label | arr indirection [p] |
82+
| test.cpp:93:9:93:11 | *arr [p] | semmle.label | *arr [p] |
8383
| test.cpp:93:14:93:14 | p | semmle.label | p |
84-
| test.cpp:98:18:98:27 | call to mk_array_p indirection [p] | semmle.label | call to mk_array_p indirection [p] |
84+
| test.cpp:98:18:98:27 | *call to mk_array_p [p] | semmle.label | *call to mk_array_p [p] |
8585
subpaths
8686
#select
8787
| test.cpp:10:9:10:11 | arr | test.cpp:4:17:4:22 | call to malloc | test.cpp:10:9:10:11 | arr | Off-by one error allocated at $@ bounded by $@. | test.cpp:4:17:4:22 | call to malloc | call to malloc | test.cpp:4:24:4:27 | size | size |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/constant-size/ConstantSizeArrayOffByOne.expected

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ edges
3535
| test.cpp:136:9:136:16 | ... += ... | test.cpp:138:13:138:15 | arr |
3636
| test.cpp:143:18:143:21 | asdf | test.cpp:134:25:134:27 | arr |
3737
| test.cpp:143:18:143:21 | asdf | test.cpp:143:18:143:21 | asdf |
38-
| test.cpp:146:26:146:26 | p indirection | test.cpp:147:4:147:9 | -- ... |
38+
| test.cpp:146:26:146:26 | *p | test.cpp:147:4:147:9 | -- ... |
3939
| test.cpp:156:12:156:14 | buf | test.cpp:156:12:156:18 | ... + ... |
40-
| test.cpp:156:12:156:18 | ... + ... | test.cpp:158:17:158:18 | & ... indirection |
41-
| test.cpp:158:17:158:18 | & ... indirection | test.cpp:146:26:146:26 | p indirection |
40+
| test.cpp:156:12:156:18 | ... + ... | test.cpp:158:17:158:18 | *& ... |
41+
| test.cpp:158:17:158:18 | *& ... | test.cpp:146:26:146:26 | *p |
4242
| test.cpp:218:23:218:28 | buffer | test.cpp:220:5:220:11 | access to array |
4343
| test.cpp:218:23:218:28 | buffer | test.cpp:221:5:221:11 | access to array |
4444
| test.cpp:229:25:229:29 | array | test.cpp:231:5:231:10 | access to array |
@@ -121,11 +121,11 @@ nodes
121121
| test.cpp:138:13:138:15 | arr | semmle.label | arr |
122122
| test.cpp:143:18:143:21 | asdf | semmle.label | asdf |
123123
| test.cpp:143:18:143:21 | asdf | semmle.label | asdf |
124-
| test.cpp:146:26:146:26 | p indirection | semmle.label | p indirection |
124+
| test.cpp:146:26:146:26 | *p | semmle.label | *p |
125125
| test.cpp:147:4:147:9 | -- ... | semmle.label | -- ... |
126126
| test.cpp:156:12:156:14 | buf | semmle.label | buf |
127127
| test.cpp:156:12:156:18 | ... + ... | semmle.label | ... + ... |
128-
| test.cpp:158:17:158:18 | & ... indirection | semmle.label | & ... indirection |
128+
| test.cpp:158:17:158:18 | *& ... | semmle.label | *& ... |
129129
| test.cpp:218:23:218:28 | buffer | semmle.label | buffer |
130130
| test.cpp:220:5:220:11 | access to array | semmle.label | access to array |
131131
| test.cpp:221:5:221:11 | access to array | semmle.label | access to array |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-359/semmle/tests/PrivateCleartextWrite.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
edges
2-
| test.cpp:45:18:45:23 | buffer | test.cpp:45:7:45:10 | func indirection |
2+
| test.cpp:45:18:45:23 | buffer | test.cpp:45:7:45:10 | *func |
33
| test.cpp:74:24:74:30 | medical | test.cpp:78:24:78:27 | temp |
44
| test.cpp:74:24:74:30 | medical | test.cpp:81:22:81:28 | medical |
55
| test.cpp:77:16:77:22 | medical | test.cpp:78:24:78:27 | temp |
@@ -10,7 +10,7 @@ edges
1010
| test.cpp:96:37:96:46 | theZipcode | test.cpp:99:42:99:51 | theZipcode |
1111
| test.cpp:99:61:99:70 | theZipcode | test.cpp:99:42:99:51 | theZipcode |
1212
nodes
13-
| test.cpp:45:7:45:10 | func indirection | semmle.label | func indirection |
13+
| test.cpp:45:7:45:10 | *func | semmle.label | *func |
1414
| test.cpp:45:18:45:23 | buffer | semmle.label | buffer |
1515
| test.cpp:57:9:57:18 | theZipcode | semmle.label | theZipcode |
1616
| test.cpp:74:24:74:30 | medical | semmle.label | medical |
@@ -25,7 +25,7 @@ nodes
2525
| test.cpp:99:42:99:51 | theZipcode | semmle.label | theZipcode |
2626
| test.cpp:99:61:99:70 | theZipcode | semmle.label | theZipcode |
2727
subpaths
28-
| test.cpp:81:22:81:28 | medical | test.cpp:45:18:45:23 | buffer | test.cpp:45:7:45:10 | func indirection | test.cpp:81:17:81:20 | call to func |
28+
| test.cpp:81:22:81:28 | medical | test.cpp:45:18:45:23 | buffer | test.cpp:45:7:45:10 | *func | test.cpp:81:17:81:20 | call to func |
2929
#select
3030
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@. | test.cpp:57:9:57:18 | theZipcode | this source of private data. |
3131
| test.cpp:74:24:74:30 | medical | test.cpp:74:24:74:30 | medical | test.cpp:74:24:74:30 | medical | This write into the external location 'medical' may contain unencrypted data from $@. | test.cpp:74:24:74:30 | medical | this source of private data. |

cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ postWithInFlow
3535
| try_catch.cpp:7:8:7:8 | call to exception | PostUpdateNode should not be the target of local flow. |
3636
viableImplInCallContextTooLarge
3737
uniqueParameterNodeAtPosition
38-
| ir.cpp:726:6:726:13 | TryCatch | 0 indirection | ir.cpp:737:22:737:22 | s indirection | Parameters with overlapping positions. |
39-
| ir.cpp:726:6:726:13 | TryCatch | 0 indirection | ir.cpp:740:24:740:24 | e indirection | Parameters with overlapping positions. |
38+
| ir.cpp:726:6:726:13 | TryCatch | 0 indirection | ir.cpp:737:22:737:22 | *s | Parameters with overlapping positions. |
39+
| ir.cpp:726:6:726:13 | TryCatch | 0 indirection | ir.cpp:740:24:740:24 | *e | Parameters with overlapping positions. |
4040
uniqueParameterNodePosition
4141
uniqueContentApprox
4242
identityLocalStep

0 commit comments

Comments
 (0)