File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
lib/codeql/swift/elements/type
src/queries/Security/CWE-135 Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,6 @@ private import codeql.swift.generated.type.Type
22
33class Type extends TypeBase {
44 override string toString ( ) { result = this .getDiagnosticsName ( ) }
5+
6+ string getName ( ) { result = this .getDiagnosticsName ( ) }
57}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
2020 override predicate isSource ( DataFlow:: Node node , string flowstate ) {
2121 // result of a call to to `String.count`
2222 exists ( MemberRefExpr member |
23- member .getBaseExpr ( ) .getType ( ) .toString ( ) = "String" and // TODO: use of toString
23+ member .getBaseExpr ( ) .getType ( ) .getName ( ) = "String" and
2424 member .getMember ( ) .toString ( ) = "count" and // TODO: use of toString
2525 node .asExpr ( ) = member and
2626 flowstate = "String"
You can’t perform that action at this time.
0 commit comments