Python: Fix bad join in returnStep

This commit is contained in:
Taus
2026-02-16 16:24:22 +00:00
parent 304cd12fff
commit cd62cdadff

View File

@@ -202,11 +202,18 @@ module TypeTrackingInput implements Shared::TypeTrackingInput<Location> {
*/
predicate returnStep(Node nodeFrom, LocalSourceNode nodeTo) {
exists(DataFlowPrivate::ExtractedDataFlowCall call |
nodeFrom.(DataFlowPrivate::ReturnNode).getEnclosingCallable() = call.getCallable() and
returnNodeEnclosingCallable(nodeFrom) = call.getCallable() and
nodeTo.(DataFlowPublic::CfgNode).getNode() = call.getNode()
)
}
pragma[nomagic]
private DataFlowDispatch::DataFlowCallable returnNodeEnclosingCallable(
DataFlowPrivate::ReturnNode returnNode
) {
result = returnNode.getEnclosingCallable()
}
/**
* Holds if `nodeFrom` is being written to the `content` content of the object in `nodeTo`.
*/