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()
25
25
* A class representing nodes that are arguments to calls.
26
26
*/
27
27
private 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 }
29
39
}
30
40
31
41
/**
@@ -325,10 +335,9 @@ private class OtherArgumentToModeledMethodCharacteristic extends Characteristics
325
335
326
336
override predicate appliesToEndpoint ( Endpoint e ) {
327
337
not ApplicationCandidatesImpl:: isSink ( e , _, _) and
328
- exists ( DataFlow :: Node otherSink , Call c |
338
+ exists ( Endpoint otherSink |
329
339
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
332
341
e != otherSink
333
342
)
334
343
}
You can’t perform that action at this time.
0 commit comments