@@ -436,6 +436,16 @@ private module Cached {
436436 iTo .( InheritanceConversionInstruction ) .getUnary ( ) = iFrom
437437 }
438438
439+ pragma [ noinline]
440+ private predicate callTargetHasInputOutput (
441+ CallInstruction call , DataFlow:: FunctionInput input , DataFlow:: FunctionOutput output
442+ ) {
443+ exists ( DataFlow:: DataFlowFunction func |
444+ call .getStaticCallTarget ( ) = func and
445+ func .hasDataFlow ( input , output )
446+ )
447+ }
448+
439449 private predicate flowOutOfAddressStep ( Operand operand , Node nTo ) {
440450 // Flow into a read node
441451 exists ( ReadNode readNode | readNode = nTo |
@@ -500,13 +510,12 @@ private module Cached {
500510 or
501511 // Flow through a modelled function that has parameter -> return value flow.
502512 exists (
503- CallInstruction call , DataFlow:: DataFlowFunction func , int index ,
504- DataFlow:: FunctionInput input , DataFlow :: FunctionOutput output
513+ CallInstruction call , int index , DataFlow:: FunctionInput input ,
514+ DataFlow:: FunctionOutput output
505515 |
506- call . getStaticCallTarget ( ) = func and
516+ callTargetHasInputOutput ( call , input , output ) and
507517 call .getArgumentOperand ( index ) = operand and
508518 not getSideEffectFor ( call , index ) instanceof ReadSideEffectInstruction and
509- func .hasDataFlow ( input , output ) and
510519 input .isParameter ( index ) and
511520 output .isReturnValue ( ) and
512521 flowOutOfAddressStep ( call .getAUse ( ) , nTo )
0 commit comments