Skip to content

Commit 1bd4aee

Browse files
committed
CPP: Effects of #1715.
1 parent 02e1edd commit 1bd4aee

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
| file://:0:0:0:0 | this | file://:0:0:0:0 | t | TAINT |
66
| file://:0:0:0:0 | this | file://:0:0:0:0 | t | TAINT |
77
| file://:0:0:0:0 | this | file://:0:0:0:0 | this | |
8+
| file://:0:0:0:0 | this | file://:0:0:0:0 | this | |
9+
| file://:0:0:0:0 | this | file://:0:0:0:0 | this | |
10+
| file://:0:0:0:0 | this | file://:0:0:0:0 | this | |
11+
| file://:0:0:0:0 | this | file://:0:0:0:0 | this | |
12+
| file://:0:0:0:0 | this | file://:0:0:0:0 | this | |
813
| file://:0:0:0:0 | this | file://:0:0:0:0 | u | TAINT |
914
| file://:0:0:0:0 | this | file://:0:0:0:0 | u | TAINT |
1015
| file://:0:0:0:0 | this | file://:0:0:0:0 | u | TAINT |
@@ -211,24 +216,26 @@
211216
| taint.cpp:228:11:232:2 | {...} | taint.cpp:228:11:232:2 | [...](...){...} | TAINT |
212217
| taint.cpp:228:12:228:12 | t | taint.cpp:228:11:232:2 | {...} | TAINT |
213218
| taint.cpp:228:15:228:15 | u | taint.cpp:228:11:232:2 | {...} | TAINT |
219+
| taint.cpp:228:17:228:17 | `this` parameter in operator() | file://:0:0:0:0 | this | |
220+
| taint.cpp:228:17:228:17 | `this` parameter in operator() | file://:0:0:0:0 | this | |
214221
| taint.cpp:235:11:235:11 | Unknown literal | taint.cpp:235:11:235:11 | constructor init of field t | TAINT |
215222
| taint.cpp:235:11:235:11 | Unknown literal | taint.cpp:235:11:235:11 | constructor init of field u | TAINT |
216223
| taint.cpp:235:11:235:11 | Unknown literal | taint.cpp:235:11:235:11 | constructor init of field v | TAINT |
217224
| taint.cpp:235:11:239:2 | [...](...){...} | taint.cpp:240:2:240:2 | b | |
218225
| taint.cpp:235:11:239:2 | {...} | taint.cpp:235:11:239:2 | [...](...){...} | TAINT |
226+
| taint.cpp:235:15:235:15 | `this` parameter in operator() | file://:0:0:0:0 | this | |
219227
| taint.cpp:238:7:238:12 | call to source | taint.cpp:238:3:238:14 | ... = ... | |
220228
| taint.cpp:243:11:243:11 | Unknown literal | taint.cpp:243:11:243:11 | constructor init of field t | TAINT |
221229
| taint.cpp:243:11:243:11 | Unknown literal | taint.cpp:243:11:243:11 | constructor init of field u | TAINT |
222230
| taint.cpp:243:11:246:2 | [...](...){...} | taint.cpp:247:2:247:2 | c | |
223231
| taint.cpp:243:11:246:2 | {...} | taint.cpp:243:11:246:2 | [...](...){...} | TAINT |
232+
| taint.cpp:243:15:243:15 | `this` parameter in operator() | file://:0:0:0:0 | this | |
233+
| taint.cpp:243:15:243:15 | `this` parameter in operator() | file://:0:0:0:0 | this | |
224234
| taint.cpp:249:11:252:2 | [...](...){...} | taint.cpp:253:2:253:2 | d | |
225235
| taint.cpp:249:18:249:18 | a | taint.cpp:250:8:250:8 | a | |
226236
| taint.cpp:249:25:249:25 | b | taint.cpp:251:8:251:8 | b | |
227237
| taint.cpp:255:11:259:2 | [...](...){...} | taint.cpp:260:2:260:2 | e | |
228238
| taint.cpp:255:19:255:19 | a | taint.cpp:256:8:256:8 | a | |
229239
| taint.cpp:255:27:255:27 | b | taint.cpp:257:8:257:8 | b | |
230240
| taint.cpp:258:7:258:12 | call to source | taint.cpp:258:3:258:14 | ... = ... | |
231-
| taint.cpp:260:4:260:4 | ref arg t | taint.cpp:260:4:260:4 | t | |
232-
| taint.cpp:260:7:260:7 | ref arg u | taint.cpp:260:7:260:7 | u | |
233-
| taint.cpp:260:10:260:10 | ref arg w | taint.cpp:260:10:260:10 | w | |
234241
| taint.cpp:260:10:260:10 | ref arg w | taint.cpp:261:7:261:7 | w | |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ void test_lambdas()
230230
sink(u);
231231
return t;
232232
};
233-
sink(a()); // tainted [NOT DETECTED]
233+
sink(a()); // tainted
234234

235235
auto b = [&] {
236236
sink(t); // tainted [NOT DETECTED]

cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
| file://:0:0:0:0 | t | taint.cpp:223:10:223:15 | call to source |
2+
| file://:0:0:0:0 | t | taint.cpp:223:10:223:15 | call to source |
3+
| file://:0:0:0:0 | t | taint.cpp:223:10:223:15 | call to source |
4+
| file://:0:0:0:0 | u | taint.cpp:223:10:223:15 | call to source |
5+
| file://:0:0:0:0 | u | taint.cpp:223:10:223:15 | call to source |
6+
| file://:0:0:0:0 | u | taint.cpp:223:10:223:15 | call to source |
17
| taint.cpp:8:8:8:13 | clean1 | taint.cpp:4:27:4:33 | source1 |
28
| taint.cpp:16:8:16:14 | source1 | taint.cpp:12:22:12:27 | call to source |
39
| taint.cpp:17:8:17:16 | ++ ... | taint.cpp:12:22:12:27 | call to source |
@@ -20,5 +26,6 @@
2026
| taint.cpp:210:7:210:7 | x | taint.cpp:207:6:207:11 | call to source |
2127
| taint.cpp:215:7:215:7 | x | taint.cpp:207:6:207:11 | call to source |
2228
| taint.cpp:216:7:216:7 | y | taint.cpp:207:6:207:11 | call to source |
29+
| taint.cpp:233:8:233:8 | call to operator() | taint.cpp:223:10:223:15 | call to source |
2330
| taint.cpp:250:8:250:8 | a | taint.cpp:223:10:223:15 | call to source |
2431
| taint.cpp:256:8:256:8 | a | taint.cpp:223:10:223:15 | call to source |

cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| file://:0:0:0:0 | taint.cpp:223:10:223:15 | AST only |
12
| taint.cpp:41:7:41:13 | taint.cpp:35:12:35:17 | AST only |
23
| taint.cpp:42:7:42:13 | taint.cpp:35:12:35:17 | AST only |
34
| taint.cpp:43:7:43:13 | taint.cpp:37:22:37:27 | AST only |
@@ -12,5 +13,6 @@
1213
| taint.cpp:195:7:195:7 | taint.cpp:193:6:193:6 | AST only |
1314
| taint.cpp:215:7:215:7 | taint.cpp:207:6:207:11 | AST only |
1415
| taint.cpp:216:7:216:7 | taint.cpp:207:6:207:11 | AST only |
16+
| taint.cpp:233:8:233:8 | taint.cpp:223:10:223:15 | AST only |
1517
| taint.cpp:250:8:250:8 | taint.cpp:223:10:223:15 | AST only |
1618
| taint.cpp:256:8:256:8 | taint.cpp:223:10:223:15 | AST only |

0 commit comments

Comments
 (0)