File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,17 @@ newtype JavaRelatedLocationType = CallContext()
2525 * A class representing nodes that are arguments to calls.
2626 */
2727private class ArgumentNode extends DataFlow:: Node {
28- ArgumentNode ( ) { this .asExpr ( ) = [ any ( Call c ) .getAnArgument ( ) , any ( Call c ) .getQualifier ( ) ] }
28+ Call c ;
29+
30+ ArgumentNode ( ) {
31+ exists ( Argument arg | this .asExpr ( ) = arg and not arg .isVararg ( ) and c = arg .getCall ( ) )
32+ or
33+ this .( DataFlow:: ImplicitVarargsArray ) .getCall ( ) = c
34+ or
35+ this = DataFlow:: getInstanceArgument ( c )
36+ }
37+
38+ Call getCall ( ) { result = c }
2939}
3040
3141/**
@@ -325,10 +335,9 @@ private class OtherArgumentToModeledMethodCharacteristic extends Characteristics
325335
326336 override predicate appliesToEndpoint ( Endpoint e ) {
327337 not ApplicationCandidatesImpl:: isSink ( e , _, _) and
328- exists ( DataFlow :: Node otherSink , Call c |
338+ exists ( Endpoint otherSink |
329339 ApplicationCandidatesImpl:: isSink ( otherSink , _, "manual" ) and
330- c = otherSink .asExpr ( ) .( Argument ) .getCall ( ) and
331- e .asExpr ( ) in [ c .getQualifier ( ) , c .getAnArgument ( ) ] and
340+ e .getCall ( ) = otherSink .getCall ( ) and
332341 e != otherSink
333342 )
334343 }
You can’t perform that action at this time.
0 commit comments