File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3729,7 +3729,7 @@ private predicate directReach(PathNode n) {
3729
3729
n instanceof PathNodeSink or directReach ( n .getASuccessor ( ) )
3730
3730
}
3731
3731
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 . */
3733
3733
private predicate reach ( PathNode n ) { directReach ( n ) or Subpaths:: retReach ( n ) }
3734
3734
3735
3735
/** Holds if `n1.getASuccessor() = n2` and `n2` can reach a sink. */
@@ -3749,7 +3749,13 @@ module PathGraph {
3749
3749
reach ( n ) and key = "semmle.label" and val = n .toString ( )
3750
3750
}
3751
3751
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
+ }
3753
3759
}
3754
3760
3755
3761
/**
@@ -4183,10 +4189,10 @@ private module Subpaths {
4183
4189
}
4184
4190
4185
4191
/**
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 .
4187
4193
*/
4188
4194
predicate retReach ( PathNode n ) {
4189
- subpaths ( _, _, n , _ )
4195
+ exists ( PathNodeMid out | subpaths ( _, _, n , out ) | directReach ( out ) or retReach ( out ) )
4190
4196
or
4191
4197
exists ( PathNode mid |
4192
4198
retReach ( mid ) and
You can’t perform that action at this time.
0 commit comments