Skip to content

Commit 52cd200

Browse files
authored
Merge pull request #10985 from asgerf/js/reaches-return-escape
JS: Do not track returned values out of the enclosing function
2 parents 924995d + 414bd40 commit 52cd200

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript/ql/lib/semmle/javascript/dataflow/Configuration.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,8 @@ private predicate reachesReturn(
11971197
exists(DataFlow::Node mid, PathSummary oldSummary, PathSummary newSummary |
11981198
flowStep(read, cfg, mid, oldSummary) and
11991199
reachesReturn(f, mid, cfg, newSummary) and
1200-
summary = oldSummary.append(newSummary)
1200+
summary = oldSummary.append(newSummary) and
1201+
pragma[only_bind_out](summary).isLevel()
12011202
)
12021203
}
12031204

0 commit comments

Comments
 (0)