mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Value-preserving methods: handle generics in DataFlowUtil.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
@@ -64,7 +64,6 @@ private class StandardLibraryValuePreservingCallable extends ValuePreservingCall
|
||||
)
|
||||
or
|
||||
this.getDeclaringType()
|
||||
.getSourceDeclaration()
|
||||
.getASourceSupertype*()
|
||||
.hasQualifiedName("java.util", "Stack") and
|
||||
this.hasName("push") and
|
||||
|
||||
@@ -410,7 +410,7 @@ predicate simpleLocalFlowStep(Node node1, Node node2) {
|
||||
summaryStep(node1, node2, "value")
|
||||
or
|
||||
exists(MethodAccess ma, ValuePreservingCallable c, int argNo |
|
||||
ma.getCallee() = c and c.returnsValue(argNo)
|
||||
ma.getCallee().getSourceDeclaration() = c and c.returnsValue(argNo)
|
||||
|
|
||||
node2.asExpr() = ma and
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user