Skip to content

Commit 3291029

Browse files
committed
Swift: Address further review comments.
1 parent ebcb1e9 commit 3291029

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

swift/ql/src/queries/Security/CWE-135/StringLengthConflation.ql

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,8 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
6161
) and
6262
c.getName() = className and
6363
c.getAMember() = f and // TODO: will this even work if its defined in a parent class?
64-
call.getFunction().(ApplyExpr).getFunction().(DeclRefExpr).getDecl() = f and
65-
call.getFunction()
66-
.(ApplyExpr)
67-
.getFunction()
68-
.(DeclRefExpr)
69-
.getDecl()
70-
.(AbstractFunctionDecl)
71-
.getName() = methodName and
64+
call.getFunction().(ApplyExpr).getStaticTarget() = f and
65+
f.(AbstractFunctionDecl).getName() = methodName and
7266
f.getParam(arg).getName() = paramName and
7367
call.getArgument(arg).getExpr() = node.asExpr() and
7468
flowstate = "String" // `String` length flowing into `NSString`

0 commit comments

Comments
 (0)