File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
swift/ql/test/library-tests/dataflow/taint/libraries Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -144,25 +144,27 @@ func taintCollections(array: inout Array<Int>, contiguousArray: inout Contiguous
144
144
sink ( arg: array [ 0 ] ) // $ tainted=142
145
145
array. withContiguousStorageIfAvailable ( {
146
146
buffer in
147
+ sink ( arg: buffer) // $ SPURIOUS: tainted=142
148
+ sink ( arg: buffer [ 0 ] ) // $ tainted=142
147
149
sink ( arg: array)
148
150
sink ( arg: array [ 0 ] ) // $ MISSING: tainted=142
149
151
} )
150
152
151
153
contiguousArray [ 0 ] = source2 ( )
152
154
sink ( arg: contiguousArray)
153
- sink ( arg: contiguousArray [ 0 ] ) // $ MISSING: tainted=151
155
+ sink ( arg: contiguousArray [ 0 ] ) // $ MISSING: tainted=153
154
156
contiguousArray. withContiguousStorageIfAvailable ( {
155
157
buffer in
156
158
sink ( arg: buffer)
157
- sink ( arg: buffer [ 0 ] ) // $ MISSING: tainted=151
159
+ sink ( arg: buffer [ 0 ] ) // $ MISSING: tainted=153
158
160
} )
159
161
160
162
dictionary [ 0 ] = source2 ( )
161
163
sink ( arg: dictionary)
162
- sink ( arg: dictionary [ 0 ] !) // $ MISSING: tainted=160
164
+ sink ( arg: dictionary [ 0 ] !) // $ MISSING: tainted=162
163
165
dictionary. withContiguousStorageIfAvailable ( {
164
166
buffer in
165
167
sink ( arg: buffer)
166
- sink ( arg: buffer [ 0 ] ) // $ MISSING: tainted=160
168
+ sink ( arg: buffer [ 0 ] ) // $ MISSING: tainted=162
167
169
} )
168
170
}
You can’t perform that action at this time.
0 commit comments