Skip to content

Commit 8256286

Browse files
committed
C++: Only allow implicit reads of fields that exist on the sink node's type.
1 parent ad8e82a commit 8256286

File tree

1 file changed

+1
-1
lines changed
  • cpp/ql/test/library-tests/dataflow/taint-tests

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module IRTest {
106106
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
107107
// allow arbitrary reads at sinks
108108
isSink(node) and
109-
c = any(DataFlow::ContentSet c_)
109+
c.(DataFlow::FieldContent).getField().getDeclaringType() = node.getType().getUnspecifiedType()
110110
}
111111
}
112112
}

0 commit comments

Comments
 (0)