Skip to content

Commit 441bf98

Browse files
committed
Java: add Vector::copyInto, BlockingQueue::drainTo
1 parent c9ae2c8 commit 441bf98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,10 @@ private predicate qualifierToMethodStep(Expr tracked, MethodAccess sink) {
181181

182182
private predicate qualifierToArgumentStep(Expr tracked, RValue sink) {
183183
exists(MethodAccess ma |
184-
ma.getMethod().(CollectionMethod).hasName("toArray") and
184+
// java.util.Vector, java.util.concurrent.BlockingQueue, java.util.Collection
185+
ma.getMethod().(CollectionMethod).hasName(["copyInto", "drainTo", "toArray"]) and
185186
tracked = ma.getQualifier() and
186-
sink = ma.getArgument(1)
187+
sink = ma.getArgument(0)
187188
)
188189
}
189190

0 commit comments

Comments
 (0)