File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
javascript/ql/src/semmle/javascript/dataflow Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -715,12 +715,17 @@ class ClassNode extends DataFlow::SourceNode {
715715 t .start ( ) and
716716 result = getAReceiverNode ( )
717717 or
718+ result = getAnInstanceReferenceAux ( t ) and
719+ // Avoid tracking into the receiver of other classes.
720+ // Note that this also blocks flows into a property of the receiver,
721+ // but the `localFieldStep` rule will often compensate for this.
722+ not result = any ( DataFlow:: ClassNode cls ) .getAReceiverNode ( )
723+ }
724+
725+ pragma [ noinline]
726+ private DataFlow:: SourceNode getAnInstanceReferenceAux ( DataFlow:: TypeTracker t ) {
718727 exists ( DataFlow:: TypeTracker t2 |
719- result = getAnInstanceReference ( t2 ) .track ( t2 , t ) and
720- // Avoid tracking into the receiver of other classes.
721- // Note that this also blocks flows into a property of the receiver,
722- // but the `localFieldStep` rule will often compensate for this.
723- not result = any ( DataFlow:: ClassNode cls ) .getAReceiverNode ( )
728+ result = getAnInstanceReference ( t2 ) .track ( t2 , t )
724729 )
725730 }
726731
You can’t perform that action at this time.
0 commit comments