File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ abstract class EnumeratedPropName extends DataFlow::Node {
5353 * For example, gets `src[key]` in `for (var key in src) { src[key]; }`.
5454 */
5555 PropRead getASourceProp ( ) {
56- result = AccessPath:: getASourceAccess ( getSourceObject ( ) ) .getAPropertyRead ( ) and
56+ result = AccessPath:: getAnAliasedSourceNode ( getSourceObject ( ) ) .getAPropertyRead ( ) and
5757 result .getPropertyNameExpr ( ) .flow ( ) .getImmediatePredecessor * ( ) = this
5858 }
5959}
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ module AccessPath {
416416 /**
417417 * Gets a SourceNode that is accessed using the same access path as the input.
418418 */
419- DataFlow:: SourceNode getASourceAccess ( DataFlow:: Node node ) {
419+ DataFlow:: SourceNode getAnAliasedSourceNode ( DataFlow:: Node node ) {
420420 exists ( DataFlow:: SourceNode root , string accessPath |
421421 node = AccessPath:: getAReferenceTo ( root , accessPath ) and
422422 result = AccessPath:: getAReferenceTo ( root , accessPath )
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ module StringOps {
168168 ( call .getMethodName ( ) = "substring" or call .getMethodName ( ) = "substr" or call .getMethodName ( ) = "slice" ) and
169169 call .getNumArgument ( ) = 2 and
170170 (
171- AccessPath:: getASourceAccess ( substring ) .getAPropertyRead ( "length" ) .flowsTo ( call .getArgument ( 1 ) )
171+ AccessPath:: getAnAliasedSourceNode ( substring ) .getAPropertyRead ( "length" ) .flowsTo ( call .getArgument ( 1 ) )
172172 or
173173 substring .getStringValue ( ) .length ( ) = call .getArgument ( 1 ) .asExpr ( ) .getIntValue ( )
174174 )
You can’t perform that action at this time.
0 commit comments