File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -183,16 +183,21 @@ module CallGraph {
183
183
[ viableCallable ( this .asCall ( ) ) , this .asCall ( ) .getCallee ( ) ] = result .asMethod ( )
184
184
}
185
185
186
+ pragma [ nomagic]
187
+ private predicate canTargetDatabaseUpdateMethod ( ) {
188
+ exists ( CallPathNode p |
189
+ p = this .getACallee ( ) and
190
+ p .asMethod ( ) instanceof DatabaseUpdateMethod
191
+ )
192
+ }
193
+
186
194
/** Gets a successor node of this `CallPathNode`, if any. */
187
195
CallPathNode getASuccessor ( ) {
188
196
this .asMethod ( ) = result .asCall ( ) .getEnclosingCallable ( )
189
197
or
190
198
result = this .getACallee ( ) and
191
199
(
192
- exists ( CallPathNode p |
193
- p = this .getACallee ( ) and
194
- p .asMethod ( ) instanceof DatabaseUpdateMethod
195
- )
200
+ this .canTargetDatabaseUpdateMethod ( )
196
201
implies
197
202
result .asMethod ( ) instanceof DatabaseUpdateMethod
198
203
)
You can’t perform that action at this time.
0 commit comments