File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
swift/ql/test/query-tests/Security/CWE-135 Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ func print(_ items: Any...) {}
55
66typealias unichar = UInt16
77
8- class NSString
8+ class NSObject
9+ {
10+ }
11+
12+ class NSString : NSObject
913{
1014 init ( string: String ) { length = string. count }
1115
@@ -16,16 +20,9 @@ class NSString
1620 var length : Int
1721}
1822
19- class NSMutableString
23+ class NSMutableString : NSString
2024{
21- init ( string: String ) { length = string. count }
22-
23- func character( at: Int ) -> unichar { return 0 }
24- func substring( from: Int ) -> String { return " " }
25- func substring( to: Int ) -> String { return " " }
2625 func insert( _: String , at: Int ) { }
27-
28- var length : Int
2926}
3027
3128class NSRange
@@ -37,6 +34,9 @@ class NSRange
3734
3835func NSMakeRange( _ loc: Int , _ len: Int ) -> NSRange { return NSRange ( location: loc, length: len) }
3936
37+
38+
39+
4040// --- tests ---
4141
4242func test( s: String ) {
You can’t perform that action at this time.
0 commit comments