mirror of
https://github.com/github/codeql.git
synced 2026-04-19 05:54:00 +02:00
Swift: Model Sequence.withContiguousSrtorageIfAvailable.
This commit is contained in:
@@ -25,6 +25,7 @@ private class SequenceSummaries extends SummaryModelCsv {
|
||||
";Sequence;true;joined();;;Argument[-1];ReturnValue;taint",
|
||||
";Sequence;true;joined(separator:);;;Argument[-1..0];ReturnValue;taint",
|
||||
";Sequence;true;first(where:);;;Argument[-1];ReturnValue;taint",
|
||||
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1];Argument[0].Parameter[0];taint",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,12 +433,12 @@ func taintThroughEncodings() {
|
||||
|
||||
clean.withContiguousStorageIfAvailable({
|
||||
ptr in
|
||||
sink(arg: ptr)
|
||||
sink(arg: ptr) // $ SPURIOUS: tainted=366
|
||||
sink(arg: ptr.baseAddress!)
|
||||
})
|
||||
tainted.withContiguousStorageIfAvailable({
|
||||
ptr in
|
||||
sink(arg: ptr)
|
||||
sink(arg: ptr) // $ tainted=366
|
||||
sink(arg: ptr.baseAddress!) // $ MISSING: tainted=366
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user