File tree Expand file tree Collapse file tree
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3729,7 +3729,7 @@ private predicate directReach(PathNode n) {
37293729 n instanceof PathNodeSink or directReach ( n .getASuccessor ( ) )
37303730}
37313731
3732- /** Holds if `n` can reach a sink or is used in a subpath. */
3732+ /** Holds if `n` can reach a sink or is used in a subpath that can reach a sink . */
37333733private predicate reach ( PathNode n ) { directReach ( n ) or Subpaths:: retReach ( n ) }
37343734
37353735/** Holds if `n1.getASuccessor() = n2` and `n2` can reach a sink. */
@@ -3749,7 +3749,13 @@ module PathGraph {
37493749 reach ( n ) and key = "semmle.label" and val = n .toString ( )
37503750 }
37513751
3752- query predicate subpaths = Subpaths:: subpaths / 4 ;
3752+ query predicate subpaths ( PathNode arg , PathNode par , PathNode ret , PathNode out ) {
3753+ Subpaths:: subpaths ( arg , par , ret , out ) and
3754+ reach ( arg ) and
3755+ reach ( par ) and
3756+ reach ( ret ) and
3757+ reach ( out )
3758+ }
37533759}
37543760
37553761/**
@@ -4183,10 +4189,10 @@ private module Subpaths {
41834189 }
41844190
41854191 /**
4186- * Holds if `n` can reach a return node in a summarized subpath.
4192+ * Holds if `n` can reach a return node in a summarized subpath that can reach a sink .
41874193 */
41884194 predicate retReach ( PathNode n ) {
4189- subpaths ( _, _, n , _ )
4195+ exists ( PathNodeMid out | subpaths ( _, _, n , out ) | directReach ( out ) or retReach ( out ) )
41904196 or
41914197 exists ( PathNode mid |
41924198 retReach ( mid ) and
You can’t perform that action at this time.
0 commit comments