reuse utility predicate

This commit is contained in:
Erik Krogh Kristensen
2021-05-13 17:49:55 +02:00
parent 681179dcbb
commit a9f7756788

View File

@@ -41,11 +41,7 @@ module UnsafeCodeConstruction {
// override to require that there is a path without unmatched return steps
override predicate hasFlowPath(DataFlow::SourcePathNode source, DataFlow::SinkPathNode sink) {
super.hasFlowPath(source, sink) and
exists(DataFlow::MidPathNode mid |
source.getASuccessor*() = mid and
sink = mid.getASuccessor() and
mid.getPathSummary().hasReturn() = false
)
DataFlow::hasPathWithoutUnmatchedReturn(source, sink)
}
}
}