Skip to content

Commit d1c8c40

Browse files
committed
Data flow: Avoid call to pathSuccPlus in Configuration::hasFlowTo(Expr)
1 parent 5cadd3c commit d1c8c40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForPathname.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ abstract class Configuration extends string {
163163
/**
164164
* Holds if data may flow from some source to `sink` for this configuration.
165165
*/
166-
predicate hasFlowTo(Node sink) { this.hasFlow(_, sink) }
166+
predicate hasFlowTo(Node sink) {
167+
sink = any(PathNodeSink n | this = n.getConfiguration()).getNodeEx().asNode()
168+
}
167169

168170
/**
169171
* Holds if data may flow from some source to `sink` for this configuration.

0 commit comments

Comments
 (0)