Python: Exceptions.qll: Updates handledObject to use getOrigin

This commit is contained in:
Rebecca Valentine
2020-03-16 11:24:55 -07:00
parent 787b80f9ae
commit 5d55db116b

View File

@@ -276,7 +276,7 @@ class ExceptFlowNode extends ControlFlowNode {
or
exists(TupleValue tup |
this.handledObject(tup, ClassValue::tuple(), _) |
val = tup.getItem(_) and origin.pointsTo(val)
element_from_tuple(tup).pointsTo(val,origin)
)
)
}
@@ -317,6 +317,12 @@ private ControlFlowNode element_from_tuple_objectapi(Object tuple) {
)
}
private ControlFlowNode element_from_tuple(Value tuple) {
exists(Tuple t |
t = tuple.getOrigin() and result = t.getAnElt().getAFlowNode()
)
}
/** A Reraising node is the node at the end of a finally block (on the exceptional branch)
* that reraises the current exception.
*/