mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
change ArrayCreationStep to a PreCallGraphStep and unrestrict the storeStep
This commit is contained in:
committed by
erik-krogh
parent
b944005046
commit
7b1ef7473e
@@ -261,14 +261,12 @@ private module ArrayDataFlow {
|
||||
/**
|
||||
* A step for creating an array and storing the elements in the array.
|
||||
*/
|
||||
private class ArrayCreationStep extends DataFlow::SharedFlowStep {
|
||||
private class ArrayCreationStep extends PreCallGraphStep {
|
||||
override predicate storeStep(DataFlow::Node element, DataFlow::SourceNode obj, string prop) {
|
||||
exists(DataFlow::ArrayCreationNode array, int i |
|
||||
element = array.getElement(i) and
|
||||
obj = array and
|
||||
if array = any(PromiseAllCreation c).getArrayNode()
|
||||
then prop = arrayElement(i)
|
||||
else prop = arrayElement()
|
||||
prop = arrayElement(i)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user