Skip to content

Commit c0b3d98

Browse files
committed
Python: Add a bit more detail to comment.
1 parent 456209b commit c0b3d98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ private import codeql.dataflow.VariableCapture as Shared
1010
// - JS: Capture flow: https://github.com/github/codeql/pull/14412/commits/7bcf8b858babfea0a3e36ce61145954c249e13ac
1111
// - JS: Disallow consecutive captured contents: https://github.com/github/codeql/pull/14412/commits/46e4cdc6232604ea7f58138a336d5a222fad8567
1212
// The first is the main implementation, the second is a performance motivated restriction.
13+
// The restriction is to clear any `CapturedVariableContent` before writing a new one
14+
// to avoid long access paths (see the link for a nice explanation).
1315
private module CaptureInput implements Shared::InputSig<Location> {
1416
private import python as PY
1517

0 commit comments

Comments
 (0)