Skip to content

Commit 0ba72c6

Browse files
committed
C++: Accept changes.
1 parent 265a641 commit 0ba72c6

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

cpp/ql/test/library-tests/dataflow/fields/flow-diff.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@
3737
| qualifiers.cpp:37:38:37:47 | call to user_input | qualifiers.cpp:38:23:38:23 | a | AST only |
3838
| qualifiers.cpp:42:29:42:38 | call to user_input | qualifiers.cpp:43:23:43:23 | a | AST only |
3939
| qualifiers.cpp:47:31:47:40 | call to user_input | qualifiers.cpp:48:23:48:23 | a | AST only |
40-
| simple.cpp:92:11:92:20 | call to user_input | simple.cpp:94:13:94:13 | i | AST only |
4140
| struct_init.c:20:20:20:29 | call to user_input | struct_init.c:33:25:33:25 | a | AST only |
4241
| struct_init.c:40:20:40:29 | call to user_input | struct_init.c:15:12:15:12 | a | AST only |

cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ edges
162162
| simple.cpp:83:9:83:28 | Store | simple.cpp:83:9:83:28 | Chi [f1] |
163163
| simple.cpp:83:17:83:26 | call to user_input | simple.cpp:83:9:83:28 | Store |
164164
| simple.cpp:84:14:84:20 | Argument -1 indirection [f1] | simple.cpp:84:14:84:20 | call to getf2f1 |
165+
| simple.cpp:92:5:92:22 | Store [i] | simple.cpp:93:20:93:20 | Store [i] |
166+
| simple.cpp:92:11:92:20 | call to user_input | simple.cpp:92:5:92:22 | Store [i] |
167+
| simple.cpp:93:20:93:20 | Store [i] | simple.cpp:94:13:94:13 | i |
165168
| struct_init.c:14:24:14:25 | *ab [a] | struct_init.c:15:12:15:12 | a |
166169
| struct_init.c:20:20:20:29 | Chi [a] | struct_init.c:24:10:24:12 | Argument 0 indirection [a] |
167170
| struct_init.c:20:20:20:29 | Store | struct_init.c:20:20:20:29 | Chi [a] |
@@ -363,6 +366,10 @@ nodes
363366
| simple.cpp:83:17:83:26 | call to user_input | semmle.label | call to user_input |
364367
| simple.cpp:84:14:84:20 | Argument -1 indirection [f1] | semmle.label | Argument -1 indirection [f1] |
365368
| simple.cpp:84:14:84:20 | call to getf2f1 | semmle.label | call to getf2f1 |
369+
| simple.cpp:92:5:92:22 | Store [i] | semmle.label | Store [i] |
370+
| simple.cpp:92:11:92:20 | call to user_input | semmle.label | call to user_input |
371+
| simple.cpp:93:20:93:20 | Store [i] | semmle.label | Store [i] |
372+
| simple.cpp:94:13:94:13 | i | semmle.label | i |
366373
| struct_init.c:14:24:14:25 | *ab [a] | semmle.label | *ab [a] |
367374
| struct_init.c:15:12:15:12 | a | semmle.label | a |
368375
| struct_init.c:20:20:20:29 | Chi [a] | semmle.label | Chi [a] |
@@ -417,6 +424,7 @@ nodes
417424
| simple.cpp:29:12:29:12 | call to b | simple.cpp:42:12:42:21 | call to user_input | simple.cpp:29:12:29:12 | call to b | call to b flows from $@ | simple.cpp:42:12:42:21 | call to user_input | call to user_input |
418425
| simple.cpp:67:13:67:13 | i | simple.cpp:65:11:65:20 | call to user_input | simple.cpp:67:13:67:13 | i | i flows from $@ | simple.cpp:65:11:65:20 | call to user_input | call to user_input |
419426
| simple.cpp:84:14:84:20 | call to getf2f1 | simple.cpp:83:17:83:26 | call to user_input | simple.cpp:84:14:84:20 | call to getf2f1 | call to getf2f1 flows from $@ | simple.cpp:83:17:83:26 | call to user_input | call to user_input |
427+
| simple.cpp:94:13:94:13 | i | simple.cpp:92:11:92:20 | call to user_input | simple.cpp:94:13:94:13 | i | i flows from $@ | simple.cpp:92:11:92:20 | call to user_input | call to user_input |
420428
| struct_init.c:15:12:15:12 | a | struct_init.c:20:20:20:29 | call to user_input | struct_init.c:15:12:15:12 | a | a flows from $@ | struct_init.c:20:20:20:29 | call to user_input | call to user_input |
421429
| struct_init.c:15:12:15:12 | a | struct_init.c:27:7:27:16 | call to user_input | struct_init.c:15:12:15:12 | a | a flows from $@ | struct_init.c:27:7:27:16 | call to user_input | call to user_input |
422430
| struct_init.c:22:11:22:11 | a | struct_init.c:20:20:20:29 | call to user_input | struct_init.c:22:11:22:11 | a | a flows from $@ | struct_init.c:20:20:20:29 | call to user_input | call to user_input |

cpp/ql/test/library-tests/dataflow/fields/simple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void single_field_test_typedef(A_typedef a)
9191
{
9292
a.i = user_input();
9393
A_typedef a2 = a;
94-
sink(a2.i); //$ast $f-:ir
94+
sink(a2.i); //$ast,ir
9595
}
9696

9797
} // namespace Simple

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
| test2.cpp:14:11:14:15 | ... * ... | $@ flows to here and is used in an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
2+
| test2.cpp:15:11:15:19 | ... * ... | $@ flows to here and is used in an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
23
| test2.cpp:16:11:16:21 | ... * ... | $@ flows to here and is used in an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
34
| test2.cpp:17:11:17:22 | ... * ... | $@ flows to here and is used in an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
45
| test3.c:12:31:12:34 | * ... | $@ flows to here and is used in an expression which might overflow negatively. | test3.c:11:15:11:18 | argv | User-provided value |

0 commit comments

Comments
 (0)