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

Skip to content

Commit 968fff2

Browse files
committed
Merge branch 'mathiasvp/replace-ast-with-ir-use-usedataflow' into flow-out-of-iterators-3
2 parents eb31160 + ce8a84a commit 968fff2

6 files changed

Lines changed: 73 additions & 21 deletions

File tree

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,11 @@ class Unit extends TUnit {
692692
}
693693

694694
/** Holds if `n` should be hidden from path explanations. */
695-
predicate nodeIsHidden(Node n) { n instanceof OperandNode and not n instanceof ArgumentNode }
695+
predicate nodeIsHidden(Node n) {
696+
n instanceof OperandNode and
697+
not n instanceof ArgumentNode and
698+
not n.asOperand() instanceof StoreValueOperand
699+
}
696700

697701
class LambdaCallKind = Unit;
698702

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-359/semmle/tests/PrivateCleartextWrite.expected

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
edges
2+
| test.cpp:45:18:45:23 | buffer | test.cpp:45:7:45:10 | func indirection |
23
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode |
34
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode |
45
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode |
@@ -9,8 +10,10 @@ edges
910
| test.cpp:77:16:77:22 | medical | test.cpp:78:11:78:15 | buff2 |
1011
| test.cpp:77:16:77:22 | medical | test.cpp:78:24:78:27 | temp |
1112
| test.cpp:77:16:77:22 | medical | test.cpp:81:22:81:28 | medical |
12-
| test.cpp:81:22:81:28 | medical | test.cpp:82:11:82:15 | buff3 |
13-
| test.cpp:81:22:81:28 | medical | test.cpp:82:24:82:28 | buff5 |
13+
| test.cpp:81:17:81:20 | call to func | test.cpp:82:11:82:15 | buff3 |
14+
| test.cpp:81:17:81:20 | call to func | test.cpp:82:24:82:28 | buff5 |
15+
| test.cpp:81:22:81:28 | medical | test.cpp:45:18:45:23 | buffer |
16+
| test.cpp:81:22:81:28 | medical | test.cpp:81:17:81:20 | call to func |
1417
| test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode |
1518
| test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode |
1619
| test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode |
@@ -27,6 +30,8 @@ edges
2730
| test.cpp:99:61:99:70 | theZipcode | test.cpp:99:42:99:51 | theZipcode |
2831
| test.cpp:99:61:99:70 | theZipcode | test.cpp:99:42:99:51 | theZipcode |
2932
nodes
33+
| test.cpp:45:7:45:10 | func indirection | semmle.label | func indirection |
34+
| test.cpp:45:18:45:23 | buffer | semmle.label | buffer |
3035
| test.cpp:57:9:57:18 | theZipcode | semmle.label | theZipcode |
3136
| test.cpp:57:9:57:18 | theZipcode | semmle.label | theZipcode |
3237
| test.cpp:57:9:57:18 | theZipcode | semmle.label | theZipcode |
@@ -36,6 +41,7 @@ nodes
3641
| test.cpp:77:16:77:22 | medical | semmle.label | medical |
3742
| test.cpp:78:11:78:15 | buff2 | semmle.label | buff2 |
3843
| test.cpp:78:24:78:27 | temp | semmle.label | temp |
44+
| test.cpp:81:17:81:20 | call to func | semmle.label | call to func |
3945
| test.cpp:81:22:81:28 | medical | semmle.label | medical |
4046
| test.cpp:82:11:82:15 | buff3 | semmle.label | buff3 |
4147
| test.cpp:82:24:82:28 | buff5 | semmle.label | buff5 |
@@ -49,6 +55,7 @@ nodes
4955
| test.cpp:99:61:99:70 | theZipcode | semmle.label | theZipcode |
5056
| test.cpp:99:61:99:70 | theZipcode | semmle.label | theZipcode |
5157
subpaths
58+
| test.cpp:81:22:81:28 | medical | test.cpp:45:18:45:23 | buffer | test.cpp:45:7:45:10 | func indirection | test.cpp:81:17:81:20 | call to func |
5259
#select
5360
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@. | test.cpp:57:9:57:18 | theZipcode | this source of private data. |
5461
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@. | test.cpp:57:9:57:18 | theZipcode | this source of private data. |

0 commit comments

Comments
 (0)