Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3f9a04

Browse files
committed
C++: Accept more tests.
1 parent 835d3fc commit f3f9a04

4 files changed

Lines changed: 9 additions & 32 deletions

File tree

cpp/ql/test/query-tests/Security/CWE/CWE-120/semmle/tests/UnboundedWrite.expected

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ edges
55
| tests.c:28:22:28:25 | argv | tests.c:28:22:28:28 | access to array |
66
| tests.c:28:22:28:25 | argv | tests.c:28:22:28:28 | access to array |
77
| tests.c:28:22:28:25 | argv | tests.c:28:22:28:28 | access to array |
8-
| tests.c:28:22:28:25 | argv | tests.c:28:22:28:28 | access to array |
9-
| tests.c:28:22:28:25 | argv | tests.c:28:22:28:28 | access to array |
10-
| tests.c:28:22:28:28 | access to array | tests.c:28:22:28:28 | (const char *)... |
11-
| tests.c:28:22:28:28 | access to array | tests.c:28:22:28:28 | access to array |
128
| tests.c:29:28:29:31 | argv | tests.c:29:28:29:34 | access to array |
139
| tests.c:29:28:29:31 | argv | tests.c:29:28:29:34 | access to array |
1410
| tests.c:29:28:29:31 | argv | tests.c:29:28:29:34 | access to array |
@@ -19,10 +15,6 @@ edges
1915
| tests.c:34:10:34:13 | argv | tests.c:34:10:34:16 | access to array |
2016
| tests.c:34:10:34:13 | argv | tests.c:34:10:34:16 | access to array |
2117
| tests.c:34:10:34:13 | argv | tests.c:34:10:34:16 | access to array |
22-
| tests.c:34:10:34:13 | argv | tests.c:34:10:34:16 | access to array |
23-
| tests.c:34:10:34:13 | argv | tests.c:34:10:34:16 | access to array |
24-
| tests.c:34:10:34:16 | access to array | tests.c:34:10:34:16 | (const char *)... |
25-
| tests.c:34:10:34:16 | access to array | tests.c:34:10:34:16 | access to array |
2618
nodes
2719
| tests.c:28:22:28:25 | argv | semmle.label | argv |
2820
| tests.c:28:22:28:25 | argv | semmle.label | argv |

cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/argv/argvLocal.expected

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ edges
55
| argvLocal.c:95:9:95:12 | argv | argvLocal.c:95:9:95:15 | access to array |
66
| argvLocal.c:95:9:95:12 | argv | argvLocal.c:95:9:95:15 | access to array |
77
| argvLocal.c:95:9:95:12 | argv | argvLocal.c:95:9:95:15 | access to array |
8-
| argvLocal.c:95:9:95:12 | argv | argvLocal.c:95:9:95:15 | access to array |
9-
| argvLocal.c:95:9:95:12 | argv | argvLocal.c:95:9:95:15 | access to array |
10-
| argvLocal.c:95:9:95:15 | access to array | argvLocal.c:95:9:95:15 | (const char *)... |
11-
| argvLocal.c:95:9:95:15 | access to array | argvLocal.c:95:9:95:15 | access to array |
128
| argvLocal.c:96:15:96:18 | argv | argvLocal.c:96:15:96:21 | access to array |
139
| argvLocal.c:96:15:96:18 | argv | argvLocal.c:96:15:96:21 | access to array |
1410
| argvLocal.c:96:15:96:18 | argv | argvLocal.c:96:15:96:21 | access to array |
@@ -39,8 +35,6 @@ edges
3935
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:106:9:106:13 | access to array |
4036
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:106:9:106:13 | access to array |
4137
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:106:9:106:13 | access to array |
42-
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:106:9:106:13 | access to array |
43-
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:106:9:106:13 | access to array |
4438
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:107:15:107:19 | access to array |
4539
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:107:15:107:19 | access to array |
4640
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:107:15:107:19 | access to array |
@@ -51,16 +45,10 @@ edges
5145
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:110:9:110:11 | * ... |
5246
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:110:9:110:11 | * ... |
5347
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:110:9:110:11 | * ... |
54-
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:110:9:110:11 | * ... |
55-
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:110:9:110:11 | * ... |
5648
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
5749
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
5850
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
5951
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
60-
| argvLocal.c:106:9:106:13 | access to array | argvLocal.c:106:9:106:13 | (const char *)... |
61-
| argvLocal.c:106:9:106:13 | access to array | argvLocal.c:106:9:106:13 | access to array |
62-
| argvLocal.c:110:9:110:11 | * ... | argvLocal.c:110:9:110:11 | (const char *)... |
63-
| argvLocal.c:110:9:110:11 | * ... | argvLocal.c:110:9:110:11 | * ... |
6452
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:116:9:116:10 | (const char *)... |
6553
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:116:9:116:10 | (const char *)... |
6654
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:116:9:116:10 | i3 |

cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ edges
5959
| test.cpp:227:24:227:37 | (const char *)... | test.cpp:229:9:229:18 | local_size |
6060
| test.cpp:241:2:241:32 | Chi [array content] | test.cpp:279:17:279:20 | get_size output argument [array content] |
6161
| test.cpp:241:2:241:32 | Chi [array content] | test.cpp:295:18:295:21 | get_size output argument [array content] |
62-
| test.cpp:241:2:241:32 | Store | test.cpp:241:2:241:32 | Chi [array content] |
63-
| test.cpp:241:18:241:23 | call to getenv | test.cpp:241:2:241:32 | Store |
64-
| test.cpp:241:18:241:31 | (const char *)... | test.cpp:241:2:241:32 | Store |
62+
| test.cpp:241:18:241:23 | call to getenv | test.cpp:241:2:241:32 | Chi [array content] |
63+
| test.cpp:241:18:241:31 | (const char *)... | test.cpp:241:2:241:32 | Chi [array content] |
6564
| test.cpp:249:20:249:25 | call to getenv | test.cpp:253:11:253:29 | ... * ... |
6665
| test.cpp:249:20:249:25 | call to getenv | test.cpp:253:11:253:29 | ... * ... |
6766
| test.cpp:249:20:249:33 | (const char *)... | test.cpp:253:11:253:29 | ... * ... |
@@ -144,7 +143,7 @@ nodes
144143
| test.cpp:235:2:235:9 | Argument 0 | semmle.label | Argument 0 |
145144
| test.cpp:237:2:237:8 | Argument 0 | semmle.label | Argument 0 |
146145
| test.cpp:241:2:241:32 | Chi [array content] | semmle.label | Chi [array content] |
147-
| test.cpp:241:2:241:32 | Store | semmle.label | Store |
146+
| test.cpp:241:2:241:32 | StoreValue | semmle.label | StoreValue |
148147
| test.cpp:241:18:241:23 | call to getenv | semmle.label | call to getenv |
149148
| test.cpp:241:18:241:31 | (const char *)... | semmle.label | (const char *)... |
150149
| test.cpp:249:20:249:25 | call to getenv | semmle.label | call to getenv |

cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ edges
4343
| test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store |
4444
| test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store |
4545
| test.cpp:13:2:13:15 | Chi [array content] | test.cpp:30:13:30:14 | get_rand2 output argument [array content] |
46-
| test.cpp:13:2:13:15 | Store | test.cpp:13:2:13:15 | Chi [array content] |
47-
| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Store |
48-
| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Store |
46+
| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Chi [array content] |
47+
| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Chi [array content] |
4948
| test.cpp:18:2:18:14 | Chi [array content] | test.cpp:36:13:36:13 | get_rand3 output argument [array content] |
50-
| test.cpp:18:2:18:14 | Store | test.cpp:18:2:18:14 | Chi [array content] |
51-
| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Store |
52-
| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Store |
49+
| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Chi [array content] |
50+
| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Chi [array content] |
5351
| test.cpp:24:11:24:18 | call to get_rand | test.cpp:25:7:25:7 | r |
5452
| test.cpp:24:11:24:18 | call to get_rand | test.cpp:25:7:25:7 | r |
5553
| test.cpp:30:13:30:14 | Chi | test.cpp:31:7:31:7 | r |
@@ -111,11 +109,11 @@ nodes
111109
| test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand |
112110
| test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand |
113111
| test.cpp:13:2:13:15 | Chi [array content] | semmle.label | Chi [array content] |
114-
| test.cpp:13:2:13:15 | Store | semmle.label | Store |
112+
| test.cpp:13:2:13:15 | StoreValue | semmle.label | StoreValue |
115113
| test.cpp:13:10:13:13 | call to rand | semmle.label | call to rand |
116114
| test.cpp:13:10:13:13 | call to rand | semmle.label | call to rand |
117115
| test.cpp:18:2:18:14 | Chi [array content] | semmle.label | Chi [array content] |
118-
| test.cpp:18:2:18:14 | Store | semmle.label | Store |
116+
| test.cpp:18:2:18:14 | StoreValue | semmle.label | StoreValue |
119117
| test.cpp:18:9:18:12 | call to rand | semmle.label | call to rand |
120118
| test.cpp:18:9:18:12 | call to rand | semmle.label | call to rand |
121119
| test.cpp:24:11:24:18 | call to get_rand | semmle.label | call to get_rand |

0 commit comments

Comments
 (0)