mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Python: Exceptions.qll: Updates handledObject to use getOrigin
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user