File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
swift/ql/src/queries/Security/CWE-135 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
63
63
c .getAMember ( ) = f and // TODO: will this even work if its defined in a parent class?
64
64
call .getFunction ( ) .( ApplyExpr ) .getStaticTarget ( ) = f and
65
65
f .getName ( ) = methodName and
66
- f .getParam ( arg ) .getName ( ) = paramName and
67
- call .getArgument ( arg ) .getExpr ( ) = node .asExpr ( ) and
66
+ f .getParam ( pragma [ only_bind_into ] ( arg ) ) .getName ( ) = paramName and
67
+ call .getArgument ( pragma [ only_bind_into ] ( arg ) ) .getExpr ( ) = node .asExpr ( ) and
68
68
flowstate = "String" // `String` length flowing into `NSString`
69
69
)
70
70
or
@@ -74,8 +74,8 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
74
74
funcName = "NSMakeRange(_:_:)" and
75
75
paramName = [ "loc" , "len" ] and
76
76
call .getStaticTarget ( ) .getName ( ) = funcName and
77
- call .getStaticTarget ( ) .getParam ( arg ) .getName ( ) = paramName and
78
- call .getArgument ( arg ) .getExpr ( ) = node .asExpr ( ) and
77
+ call .getStaticTarget ( ) .getParam ( pragma [ only_bind_into ] ( arg ) ) .getName ( ) = paramName and
78
+ call .getArgument ( pragma [ only_bind_into ] ( arg ) ) .getExpr ( ) = node .asExpr ( ) and
79
79
flowstate = "String" // `String` length flowing into `NSString`
80
80
)
81
81
}
You can’t perform that action at this time.
0 commit comments