Skip to content

Commit 9e46ef3

Browse files
author
edvraa
committed
Get rid of getParent
1 parent 8084449 commit 9e46ef3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ module UnsafeDeserialization {
2727
abstract private class InstanceMethodSink extends Sink {
2828
InstanceMethodSink() {
2929
not exists(
30-
SafeConstructorTrackingConfig safeConstructorTracking, DataFlow::Node safeTypeUsage
30+
SafeConstructorTrackingConfig safeConstructorTracking, DataFlow::Node safeTypeUsage,
31+
MethodCall mc
3132
|
3233
safeConstructorTracking.hasFlow(_, safeTypeUsage) and
33-
safeTypeUsage.asExpr().getParent() = this.asExpr().getParent()
34+
mc.getQualifier() = safeTypeUsage.asExpr() and
35+
mc.getAnArgument() = this.asExpr()
3436
)
3537
}
3638
}

0 commit comments

Comments
 (0)