File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,20 @@ class InvokeNode extends DataFlow::SourceNode instanceof DataFlow::Impl::InvokeN
92
92
* but the position of `z` cannot be determined, hence there are no first and second
93
93
* argument nodes.
94
94
*/
95
- DataFlow:: Node getArgument ( int i ) { result = super .getArgument ( i ) }
95
+ cached
96
+ DataFlow:: Node getArgument ( int i ) {
97
+ result = super .getArgument ( i ) and Stages:: DataFlowStage:: ref ( )
98
+ }
96
99
97
100
/** Gets the data flow node corresponding to an argument of this invocation. */
98
- DataFlow:: Node getAnArgument ( ) { result = super .getAnArgument ( ) }
101
+ cached
102
+ DataFlow:: Node getAnArgument ( ) { result = super .getAnArgument ( ) and Stages:: DataFlowStage:: ref ( ) }
99
103
100
104
/** Gets the data flow node corresponding to the last argument of this invocation. */
101
- DataFlow:: Node getLastArgument ( ) { result = this .getArgument ( this .getNumArgument ( ) - 1 ) }
105
+ cached
106
+ DataFlow:: Node getLastArgument ( ) {
107
+ result = this .getArgument ( this .getNumArgument ( ) - 1 ) and Stages:: DataFlowStage:: ref ( )
108
+ }
102
109
103
110
/**
104
111
* Gets a data flow node corresponding to an array of values being passed as
Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ module Stages {
145
145
exists ( any ( DataFlow:: PropRef ref ) .getBase ( ) )
146
146
or
147
147
exists ( any ( DataFlow:: ClassNode cls ) )
148
+ or
149
+ exists ( any ( DataFlow:: CallNode node ) .getArgument ( _) )
150
+ or
151
+ exists ( any ( DataFlow:: CallNode node ) .getAnArgument ( ) )
152
+ or
153
+ exists ( any ( DataFlow:: CallNode node ) .getLastArgument ( ) )
148
154
}
149
155
}
150
156
You can’t perform that action at this time.
0 commit comments