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 {
183183 [ viableCallable ( this .asCall ( ) ) , this .asCall ( ) .getCallee ( ) ] = result .asMethod ( )
184184 }
185185
186+ pragma [ nomagic]
187+ private predicate canTargetDatabaseUpdateMethod ( ) {
188+ exists ( CallPathNode p |
189+ p = this .getACallee ( ) and
190+ p .asMethod ( ) instanceof DatabaseUpdateMethod
191+ )
192+ }
193+
186194 /** Gets a successor node of this `CallPathNode`, if any. */
187195 CallPathNode getASuccessor ( ) {
188196 this .asMethod ( ) = result .asCall ( ) .getEnclosingCallable ( )
189197 or
190198 result = this .getACallee ( ) and
191199 (
192- exists ( CallPathNode p |
193- p = this .getACallee ( ) and
194- p .asMethod ( ) instanceof DatabaseUpdateMethod
195- )
200+ this .canTargetDatabaseUpdateMethod ( )
196201 implies
197202 result .asMethod ( ) instanceof DatabaseUpdateMethod
198203 )
You can’t perform that action at this time.
0 commit comments