File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,7 @@ module DataFlow {
492
492
* Gets the data flow node corresponding to the base object
493
493
* whose property is read from or written to.
494
494
*/
495
+ cached
495
496
abstract Node getBase ( ) ;
496
497
497
498
/**
@@ -595,7 +596,10 @@ module DataFlow {
595
596
596
597
PropLValueAsPropWrite ( ) { astNode instanceof LValue }
597
598
598
- override Node getBase ( ) { result = valueNode ( astNode .getBase ( ) ) }
599
+ override Node getBase ( ) {
600
+ result = valueNode ( astNode .getBase ( ) ) and
601
+ Stages:: DataFlowStage:: ref ( )
602
+ }
599
603
600
604
override Expr getPropertyNameExpr ( ) { result = astNode .getPropertyNameExpr ( ) }
601
605
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ module Stages {
133
133
exists ( any ( DataFlow:: Node node ) .toString ( ) )
134
134
or
135
135
exists ( any ( AccessPath a ) .getAnInstanceIn ( _) )
136
+ or
137
+ exists ( any ( DataFlow:: PropRef ref ) .getBase ( ) )
136
138
}
137
139
}
138
140
You can’t perform that action at this time.
0 commit comments