Skip to content

Commit 1581a27

Browse files
author
edvraa
committed
Simplify getTarget check
1 parent b027fdd commit 1581a27

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

csharp/ql/src/semmle/code/csharp/security/dataflow/UnsafeDeserialization.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ module UnsafeDeserialization {
6363
override predicate isSource(DataFlow::Node source) { source instanceof Source }
6464

6565
override predicate isSink(DataFlow::Node sink) {
66-
exists(MethodCall mc, Method m |
67-
m = mc.getTarget() and
68-
m instanceof UnsafeDeserializerCallable and
66+
exists(MethodCall mc |
67+
mc.getTarget() instanceof UnsafeDeserializerCallable and
6968
sink.asExpr() = mc.getQualifier()
7069
)
7170
}
@@ -102,9 +101,8 @@ module UnsafeDeserialization {
102101
}
103102

104103
override predicate isSink(DataFlow::Node sink) {
105-
exists(MethodCall mc, Method m |
106-
m = mc.getTarget() and
107-
m instanceof UnsafeDeserializerCallable and
104+
exists(MethodCall mc |
105+
mc.getTarget() instanceof UnsafeDeserializerCallable and
108106
sink.asExpr() = mc.getQualifier()
109107
)
110108
}

0 commit comments

Comments
 (0)