Skip to content

Commit ecefa3e

Browse files
committed
Swift: Fix a corrupted model.
1 parent 44e33c7 commit ecefa3e

File tree

2 files changed

+2
-2
lines changed
  • swift/ql
    • lib/codeql/swift/frameworks/StandardLibrary
    • test/library-tests/dataflow/taint/libraries

2 files changed

+2
-2
lines changed

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Url.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private class UrlSummaries extends SummaryModelCsv {
119119
";URL;true;resourceValues(forKeys:);;;Argument[-1];ReturnValue;taint",
120120
";URL;true;setResourceValues(_:);;;Argument[0];Argument[-1];taint",
121121
";URL;true;setTemporaryResourceValue(_:forKey:);;;Argument[-1..0];Argument[-1];taint",
122-
";URL;true;withUnsafeFileSystemRepresentation(_:);;;Argument[-1],Argument[0].Parameter[0];ReturnValue;taint",
122+
";URL;true;withUnsafeFileSystemRepresentation(_:);;;Argument[-1];Argument[0].Parameter[0].OptionalSome.CollectionElement;taint",
123123
";URL;true;withUnsafeFileSystemRepresentation(_:);;;Argument[0].ReturnValue;ReturnValue;taint",
124124
";URL;true;resolvingSymlinksInPath();;;Argument[-1];ReturnValue;taint",
125125
";URL;true;appendPathComponent(_:);;;Argument[-1..0];Argument[-1];taint",

swift/ql/test/library-tests/dataflow/taint/libraries/url.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func taintThroughURL() {
324324
})
325325
urlTainted.withUnsafeFileSystemRepresentation({
326326
ptr in
327-
sink(any: ptr!) // $ MISSING: tainted=210
327+
sink(any: ptr!) // $ tainted=210
328328
})
329329

330330
sink(arg: urlTainted.resolvingSymlinksInPath()) // $ tainted=210

0 commit comments

Comments
 (0)