Skip to content

Commit 6f5ed9a

Browse files
committed
C++: Accept test changes.
1 parent 5ad3e97 commit 6f5ed9a

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

cpp/ql/test/library-tests/dataflow/dataflow-tests/flowOut.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void modify_copy_via_strdup(char* p) { // $ ast-def=p
7070

7171
void test_modify_copy_via_strdup(char* p) { // $ ast-def=p
7272
modify_copy_via_strdup(p);
73-
sink(*p); // $ SPURIOUS: ir
73+
sink(*p); // clean
7474
}
7575

7676
int* deref(int** p) { // $ ast-def=p
@@ -114,5 +114,5 @@ void modify_copy_via_memcpy(char* p) { // $ ast-def=p
114114

115115
void test_modify_copy_via_memcpy(char* p) { // $ ast-def=p
116116
modify_copy_via_memcpy(p);
117-
sink(*p); // $ SPURIOUS: ir
117+
sink(*p); // clean
118118
}

cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected

-2
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ irFlow
174174
| dispatch.cpp:144:8:144:13 | call to source | dispatch.cpp:96:8:96:8 | x |
175175
| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:31:9:31:9 | x |
176176
| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:61:8:61:11 | access to array |
177-
| flowOut.cpp:8:16:8:23 | call to source | flowOut.cpp:73:8:73:9 | * ... |
178-
| flowOut.cpp:8:16:8:23 | call to source | flowOut.cpp:117:8:117:9 | * ... |
179177
| flowOut.cpp:84:18:84:23 | call to source | flowOut.cpp:85:8:85:9 | * ... |
180178
| flowOut.cpp:90:8:90:13 | call to source | flowOut.cpp:102:8:102:9 | * ... |
181179
| globals.cpp:5:17:5:22 | call to source | globals.cpp:6:10:6:14 | local |

cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowDestination.expected

-11
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,11 @@ edges
33
| main.cpp:7:33:7:36 | **argv | overflowdestination.cpp:23:45:23:48 | **argv |
44
| overflowdestination.cpp:23:45:23:48 | **argv | overflowdestination.cpp:30:17:30:20 | *arg1 |
55
| overflowdestination.cpp:43:8:43:10 | fgets output argument | overflowdestination.cpp:46:15:46:17 | *src |
6-
| overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:53:9:53:12 | memcpy output argument |
76
| overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:53:15:53:17 | *src |
8-
| overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:54:9:54:12 | memcpy output argument |
9-
| overflowdestination.cpp:53:9:53:12 | memcpy output argument | overflowdestination.cpp:54:9:54:12 | memcpy output argument |
10-
| overflowdestination.cpp:54:9:54:12 | memcpy output argument | overflowdestination.cpp:54:9:54:12 | memcpy output argument |
117
| overflowdestination.cpp:57:52:57:54 | *src | overflowdestination.cpp:64:16:64:19 | *src2 |
128
| overflowdestination.cpp:73:8:73:10 | fgets output argument | overflowdestination.cpp:75:30:75:32 | *src |
139
| overflowdestination.cpp:73:8:73:10 | fgets output argument | overflowdestination.cpp:76:30:76:32 | *src |
1410
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:50:52:50:54 | *src |
15-
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument |
16-
| overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument | overflowdestination.cpp:76:30:76:32 | *src |
1711
| overflowdestination.cpp:76:30:76:32 | *src | overflowdestination.cpp:57:52:57:54 | *src |
1812
nodes
1913
| main.cpp:6:27:6:30 | **argv | semmle.label | **argv |
@@ -23,18 +17,13 @@ nodes
2317
| overflowdestination.cpp:43:8:43:10 | fgets output argument | semmle.label | fgets output argument |
2418
| overflowdestination.cpp:46:15:46:17 | *src | semmle.label | *src |
2519
| overflowdestination.cpp:50:52:50:54 | *src | semmle.label | *src |
26-
| overflowdestination.cpp:53:9:53:12 | memcpy output argument | semmle.label | memcpy output argument |
2720
| overflowdestination.cpp:53:15:53:17 | *src | semmle.label | *src |
28-
| overflowdestination.cpp:54:9:54:12 | memcpy output argument | semmle.label | memcpy output argument |
2921
| overflowdestination.cpp:57:52:57:54 | *src | semmle.label | *src |
3022
| overflowdestination.cpp:64:16:64:19 | *src2 | semmle.label | *src2 |
3123
| overflowdestination.cpp:73:8:73:10 | fgets output argument | semmle.label | fgets output argument |
3224
| overflowdestination.cpp:75:30:75:32 | *src | semmle.label | *src |
33-
| overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument | semmle.label | overflowdest_test2 output argument |
3425
| overflowdestination.cpp:76:30:76:32 | *src | semmle.label | *src |
3526
subpaths
36-
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:53:9:53:12 | memcpy output argument | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument |
37-
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:54:9:54:12 | memcpy output argument | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument |
3827
#select
3928
| overflowdestination.cpp:30:2:30:8 | call to strncpy | main.cpp:6:27:6:30 | **argv | overflowdestination.cpp:30:17:30:20 | *arg1 | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
4029
| overflowdestination.cpp:46:2:46:7 | call to memcpy | overflowdestination.cpp:43:8:43:10 | fgets output argument | overflowdestination.cpp:46:15:46:17 | *src | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |

0 commit comments

Comments
 (0)