mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C++: Only allow implicit reads of fields that exist on the sink node's type.
This commit is contained in:
@@ -106,7 +106,7 @@ module IRTest {
|
||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
|
||||
// allow arbitrary reads at sinks
|
||||
isSink(node) and
|
||||
c = any(DataFlow::ContentSet c_)
|
||||
c.(DataFlow::FieldContent).getField().getDeclaringType() = node.getType().getUnspecifiedType()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user