Skip to content

Commit 82f2540

Browse files
author
Robert Marsh
authored
Merge pull request #2871 from geoffw0/fixasttest
C++: Fix a test that should be working on the AST dataflow.
2 parents 38be267 + df29143 commit 82f2540

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

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

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,39 @@
1515
| test.cpp:38:23:38:28 | call to getenv | test.cpp:38:23:38:28 | call to getenv | |
1616
| test.cpp:38:23:38:28 | call to getenv | test.cpp:38:23:38:40 | (const char *)... | |
1717
| test.cpp:38:23:38:28 | call to getenv | test.cpp:40:14:40:19 | envStr | |
18-
| test.cpp:49:23:49:28 | call to getenv | test.cpp:8:24:8:25 | s1 | |
18+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:8:24:8:25 | s1 | envStrGlobal |
1919
| test.cpp:49:23:49:28 | call to getenv | test.cpp:45:13:45:24 | envStrGlobal | |
20+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:45:13:45:24 | envStrGlobal | envStrGlobal |
2021
| test.cpp:49:23:49:28 | call to getenv | test.cpp:49:14:49:19 | envStr | |
2122
| test.cpp:49:23:49:28 | call to getenv | test.cpp:49:23:49:28 | call to getenv | |
2223
| test.cpp:49:23:49:28 | call to getenv | test.cpp:49:23:49:40 | (const char *)... | |
24+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:50:15:50:24 | envStr_ptr | |
25+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:50:15:50:24 | envStr_ptr | envStrGlobal |
26+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:50:28:50:40 | & ... | envStrGlobal |
27+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:50:29:50:40 | envStrGlobal | envStrGlobal |
28+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:52:2:52:12 | * ... | |
29+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:52:3:52:12 | envStr_ptr | |
2330
| test.cpp:49:23:49:28 | call to getenv | test.cpp:52:16:52:21 | envStr | |
24-
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:6:54:35 | ! ... | |
25-
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:7:54:12 | call to strcmp | |
26-
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:7:54:35 | (bool)... | |
27-
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:14:54:25 | envStrGlobal | |
31+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:6:54:35 | ! ... | envStrGlobal |
32+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:7:54:12 | call to strcmp | envStrGlobal |
33+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:7:54:35 | (bool)... | envStrGlobal |
34+
| test.cpp:49:23:49:28 | call to getenv | test.cpp:54:14:54:25 | envStrGlobal | envStrGlobal |
2835
| test.cpp:60:29:60:34 | call to getenv | test.cpp:10:27:10:27 | s | |
2936
| test.cpp:60:29:60:34 | call to getenv | test.cpp:60:18:60:25 | userName | |
3037
| test.cpp:60:29:60:34 | call to getenv | test.cpp:60:29:60:34 | call to getenv | |
3138
| test.cpp:60:29:60:34 | call to getenv | test.cpp:60:29:60:47 | (const char *)... | |
3239
| test.cpp:60:29:60:34 | call to getenv | test.cpp:64:25:64:32 | userName | |
40+
| test.cpp:68:28:68:33 | call to getenv | test.cpp:11:20:11:21 | s1 | |
3341
| test.cpp:68:28:68:33 | call to getenv | test.cpp:11:36:11:37 | s2 | |
42+
| test.cpp:68:28:68:33 | call to getenv | test.cpp:67:7:67:13 | copying | |
3443
| test.cpp:68:28:68:33 | call to getenv | test.cpp:68:17:68:24 | userName | |
3544
| test.cpp:68:28:68:33 | call to getenv | test.cpp:68:28:68:33 | call to getenv | |
3645
| test.cpp:68:28:68:33 | call to getenv | test.cpp:68:28:68:46 | (const char *)... | |
46+
| test.cpp:68:28:68:33 | call to getenv | test.cpp:69:10:69:13 | copy | |
3747
| test.cpp:68:28:68:33 | call to getenv | test.cpp:70:5:70:10 | call to strcpy | |
48+
| test.cpp:68:28:68:33 | call to getenv | test.cpp:70:12:70:15 | copy | |
3849
| test.cpp:68:28:68:33 | call to getenv | test.cpp:70:18:70:25 | userName | |
50+
| test.cpp:68:28:68:33 | call to getenv | test.cpp:71:12:71:15 | copy | |
3951
| test.cpp:75:20:75:25 | call to getenv | test.cpp:15:22:15:25 | nptr | |
4052
| test.cpp:75:20:75:25 | call to getenv | test.cpp:75:15:75:18 | call to atoi | |
4153
| test.cpp:75:20:75:25 | call to getenv | test.cpp:75:20:75:25 | call to getenv | |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import semmle.code.cpp.security.TaintTracking
1+
import semmle.code.cpp.security.TaintTrackingImpl
22

33
from Expr source, Element tainted, string globalVar
44
where

0 commit comments

Comments
 (0)