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
2
2
3
3
class Type extends TypeBase {
4
4
override string toString ( ) { result = this .getDiagnosticsName ( ) }
5
+
6
+ string getName ( ) { result = this .getDiagnosticsName ( ) }
5
7
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
20
20
override predicate isSource ( DataFlow:: Node node , string flowstate ) {
21
21
// result of a call to to `String.count`
22
22
exists ( MemberRefExpr member |
23
- member .getBaseExpr ( ) .getType ( ) .toString ( ) = "String" and // TODO: use of toString
23
+ member .getBaseExpr ( ) .getType ( ) .getName ( ) = "String" and
24
24
member .getMember ( ) .toString ( ) = "count" and // TODO: use of toString
25
25
node .asExpr ( ) = member and
26
26
flowstate = "String"
You can’t perform that action at this time.
0 commit comments