Skip to content

Commit 006d77f

Browse files
committed
Refactor QL to make type check more concise
1 parent 439cf7a commit 006d77f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,7 @@ predicate unsafeDeserialization(MethodCall ma, Expr sink) {
149149
exists(Method m | m = ma.getMethod() |
150150
m instanceof ObjectInputStreamReadObjectMethod and
151151
sink = ma.getQualifier() and
152-
not exists(DataFlow::ExprNode node |
153-
node.getExpr() = sink and
154-
node.getTypeBound() instanceof SafeObjectInputStreamType
155-
)
152+
not DataFlow::exprNode(sink).getTypeBound() instanceof SafeObjectInputStreamType
156153
or
157154
m instanceof XmlDecoderReadObjectMethod and
158155
sink = ma.getQualifier()

0 commit comments

Comments
 (0)