Skip to content

Commit 299b3f7

Browse files
Merge pull request #19325 from joefarebrother/python-qual-loop-var-capture
Python: Tweak LoopVariableCapture for performance
2 parents e5d2961 + 6431228 commit 299b3f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/src/Variables/LoopVariableCapture/LoopVariableCaptureQuery.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module EscapingCaptureFlowConfig implements DataFlow::ConfigSig {
5959
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet cs) {
6060
isSink(node) and
6161
(
62-
cs instanceof DataFlow::TupleElementContent or
62+
cs.(DataFlow::TupleElementContent).getIndex() in [0 .. 10] or
6363
cs instanceof DataFlow::ListElementContent or
6464
cs instanceof DataFlow::SetElementContent or
6565
cs instanceof DataFlow::DictionaryElementAnyContent

0 commit comments

Comments
 (0)