We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8875487 commit 507cf11Copy full SHA for 507cf11
swift/ql/test/library-tests/dataflow/taint/libraries/url.swift
@@ -496,3 +496,19 @@ func taintUrlAsync() async throws {
496
sink(string: line) // $ MISSING: tainted=490
497
}
498
499
+
500
+func closureReturnValue() {
501
+ let url = URL(string: "http://example.com/")!
502
503
+ let r1 = url.withUnsafeFileSystemRepresentation({
504
+ ptr in
505
+ return "abc"
506
+ })
507
+ sink(string: r1)
508
509
+ let r2 = url.withUnsafeFileSystemRepresentation({
510
511
+ return source() as! String
512
513
+ sink(string: r2) // $ tainted=511
514
+}
0 commit comments