@@ -45,7 +45,7 @@ class NSString {
45
45
}
46
46
47
47
class Data {
48
- struct ReadingOptions : OptionSet { let rawValue : Int }
48
+ struct ReadingOptions : OptionSet { let rawValue : Int }
49
49
struct WritingOptions : OptionSet { let rawValue : Int }
50
50
51
51
init < S> ( _ elements: S ) { count = 0 }
@@ -369,10 +369,10 @@ func test(buffer1: UnsafeMutablePointer<UInt8>, buffer2: UnsafeMutablePointer<UI
369
369
// sqlite3
370
370
371
371
var db : OpaquePointer ?
372
- let localData = Data ( 0 )
373
- let remoteData = Data ( contentsOf: URL ( string: " http://example.com/ " ) !, options: [ ] )
374
- localData. copyBytes ( to: buffer1, count: localData. count)
375
- remoteData. copyBytes ( to: buffer2, count: remoteData. count)
372
+ let localData = Data ( 0 )
373
+ let remoteData = Data ( contentsOf: URL ( string: " http://example.com/ " ) !, options: [ ] )
374
+ localData. copyBytes ( to: buffer1, count: localData. count)
375
+ remoteData. copyBytes ( to: buffer2, count: remoteData. count)
376
376
377
377
_ = sqlite3_open ( " myFile.sqlite3 " , & db) // GOOD
378
378
_ = sqlite3_open ( remoteString, & db) // $ hasPathInjection=253
@@ -386,7 +386,7 @@ func test(buffer1: UnsafeMutablePointer<UInt8>, buffer2: UnsafeMutablePointer<UI
386
386
387
387
// SQLite.swift
388
388
389
- try ! _ = Connection ( )
389
+ try ! _ = Connection ( )
390
390
try ! _ = Connection ( Connection . Location. uri ( " myFile.sqlite3 " ) ) // GOOD
391
391
try ! _ = Connection ( Connection . Location. uri ( remoteString) ) // $ MISSING: hasPathInjection=253
392
392
try ! _ = Connection ( " myFile.sqlite3 " ) // GOOD
0 commit comments