@@ -1230,6 +1230,11 @@ private module Stage2 {
1230
1230
callMayFlowThroughFwd ( call , pragma [ only_bind_into ] ( config ) )
1231
1231
}
1232
1232
1233
+ pragma [ nomagic]
1234
+ private predicate returnNodeMayFlowThrough ( RetNodeEx ret , Ap ap , Configuration config ) {
1235
+ fwdFlow ( ret , any ( CcCall ccc ) , apSome ( _) , ap , config )
1236
+ }
1237
+
1233
1238
/**
1234
1239
* Holds if `node` with access path `ap` is part of a path from a source to a
1235
1240
* sink in the configuration `config`.
@@ -1306,7 +1311,7 @@ private module Stage2 {
1306
1311
// flow out of a callable
1307
1312
revFlowOut ( _, node , _, _, ap , config ) and
1308
1313
toReturn = true and
1309
- if fwdFlow ( node , any ( CcCall ccc ) , apSome ( _ ) , ap , config )
1314
+ if returnNodeMayFlowThrough ( node , ap , config )
1310
1315
then returnAp = apSome ( ap )
1311
1316
else returnAp = apNone ( )
1312
1317
}
@@ -1925,6 +1930,11 @@ private module Stage3 {
1925
1930
callMayFlowThroughFwd ( call , pragma [ only_bind_into ] ( config ) )
1926
1931
}
1927
1932
1933
+ pragma [ nomagic]
1934
+ private predicate returnNodeMayFlowThrough ( RetNodeEx ret , Ap ap , Configuration config ) {
1935
+ fwdFlow ( ret , any ( CcCall ccc ) , apSome ( _) , ap , config )
1936
+ }
1937
+
1928
1938
/**
1929
1939
* Holds if `node` with access path `ap` is part of a path from a source to a
1930
1940
* sink in the configuration `config`.
@@ -2001,7 +2011,7 @@ private module Stage3 {
2001
2011
// flow out of a callable
2002
2012
revFlowOut ( _, node , _, _, ap , config ) and
2003
2013
toReturn = true and
2004
- if fwdFlow ( node , any ( CcCall ccc ) , apSome ( _ ) , ap , config )
2014
+ if returnNodeMayFlowThrough ( node , ap , config )
2005
2015
then returnAp = apSome ( ap )
2006
2016
else returnAp = apNone ( )
2007
2017
}
@@ -2691,6 +2701,11 @@ private module Stage4 {
2691
2701
callMayFlowThroughFwd ( call , pragma [ only_bind_into ] ( config ) )
2692
2702
}
2693
2703
2704
+ pragma [ nomagic]
2705
+ private predicate returnNodeMayFlowThrough ( RetNodeEx ret , Ap ap , Configuration config ) {
2706
+ fwdFlow ( ret , any ( CcCall ccc ) , apSome ( _) , ap , config )
2707
+ }
2708
+
2694
2709
/**
2695
2710
* Holds if `node` with access path `ap` is part of a path from a source to a
2696
2711
* sink in the configuration `config`.
@@ -2767,7 +2782,7 @@ private module Stage4 {
2767
2782
// flow out of a callable
2768
2783
revFlowOut ( _, node , _, _, ap , config ) and
2769
2784
toReturn = true and
2770
- if fwdFlow ( node , any ( CcCall ccc ) , apSome ( _ ) , ap , config )
2785
+ if returnNodeMayFlowThrough ( node , ap , config )
2771
2786
then returnAp = apSome ( ap )
2772
2787
else returnAp = apNone ( )
2773
2788
}
0 commit comments