Skip to content

Commit 981f675

Browse files
committed
DataFlow: Introduce 'revSinkNode'.
1 parent 50f5c4d commit 981f675

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

shared/dataflow/codeql/dataflow/DataFlowImpl.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4003,13 +4003,22 @@ module MakeImpl<DataFlowParameter Lang> {
40034003

40044004
private predicate relevantState(FlowState state) {
40054005
sourceNode(_, state) or
4006-
sinkNodeWithState(_, state) or
4006+
revSinkNode(_, state) or
40074007
additionalLocalStateStep(_, state, _, _) or
40084008
additionalLocalStateStep(_, _, _, state) or
40094009
additionalJumpStateStep(_, state, _, _) or
40104010
additionalJumpStateStep(_, _, _, state)
40114011
}
40124012

4013+
private predicate revSinkNode(NodeEx node, FlowState state) {
4014+
sinkNodeWithState(node, state)
4015+
or
4016+
Config::isSink(node.asNode()) and
4017+
relevantState(state) and
4018+
not fullBarrier(node) and
4019+
not stateBarrier(node, state)
4020+
}
4021+
40134022
private newtype TSummaryCtx1 =
40144023
TSummaryCtx1None() or
40154024
TSummaryCtx1Param(ParamNodeEx p)

0 commit comments

Comments
 (0)