mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Swift: Permit data flow from generic arguments, rather than just pointers.
This commit is contained in:
@@ -211,9 +211,7 @@ private module Cached {
|
||||
private predicate modifiable(Argument arg) {
|
||||
arg.getExpr() instanceof InOutExpr
|
||||
or
|
||||
arg.getExpr().getType() instanceof NominalType
|
||||
or
|
||||
arg.getExpr().getType() instanceof PointerType
|
||||
arg.getExpr().getType() instanceof NominalOrBoundGenericNominalType
|
||||
}
|
||||
|
||||
predicate modifiableParam(ParamDecl param) {
|
||||
|
||||
@@ -125,5 +125,5 @@ func testWritingPointerContainersInCalls(mpc: MyPointerContainer, mgpc: MyGeneri
|
||||
sink(arg: mpc.ptr.pointee) // $ tainted=114
|
||||
|
||||
writeGenericPointerContainer(mgpc: mgpc)
|
||||
sink(arg: mgpc.ptr.pointee) // $ MISSING: tainted=119
|
||||
sink(arg: mgpc.ptr.pointee) // $ tainted=119
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user