Skip to content

Commit a9f7756

Browse files
committed
reuse utility predicate
1 parent 681179d commit a9f7756

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/UnsafeCodeConstruction.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ module UnsafeCodeConstruction {
4141
// override to require that there is a path without unmatched return steps
4242
override predicate hasFlowPath(DataFlow::SourcePathNode source, DataFlow::SinkPathNode sink) {
4343
super.hasFlowPath(source, sink) and
44-
exists(DataFlow::MidPathNode mid |
45-
source.getASuccessor*() = mid and
46-
sink = mid.getASuccessor() and
47-
mid.getPathSummary().hasReturn() = false
48-
)
44+
DataFlow::hasPathWithoutUnmatchedReturn(source, sink)
4945
}
5046
}
5147
}

0 commit comments

Comments
 (0)