mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
JS: More precise model of .shift()
Array.prototype.shift only returns the first array element. The mutation of Argument[this] is not yet modelled, and is better handled when we have use-use flow.
This commit is contained in:
@@ -484,7 +484,7 @@ class Shift extends SummarizedCallable {
|
||||
|
||||
override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
|
||||
preservesValue = true and
|
||||
input = "Argument[this].ArrayElement" and
|
||||
input = "Argument[this].ArrayElement[0]" and
|
||||
output = "ReturnValue"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user