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 {
6363 c .getAMember ( ) = f and // TODO: will this even work if its defined in a parent class?
6464 call .getFunction ( ) .( ApplyExpr ) .getStaticTarget ( ) = f and
6565 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
6868 flowstate = "String" // `String` length flowing into `NSString`
6969 )
7070 or
@@ -74,8 +74,8 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
7474 funcName = "NSMakeRange(_:_:)" and
7575 paramName = [ "loc" , "len" ] and
7676 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
7979 flowstate = "String" // `String` length flowing into `NSString`
8080 )
8181 }
You can’t perform that action at this time.
0 commit comments