Value-preserving methods: handle generics in DataFlowUtil.qll

Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
Chris Smowton
2021-03-05 13:15:06 +00:00
committed by GitHub
parent ca86925a45
commit a37b98ca27
2 changed files with 1 additions and 2 deletions

View File

@@ -64,7 +64,6 @@ private class StandardLibraryValuePreservingCallable extends ValuePreservingCall
)
or
this.getDeclaringType()
.getSourceDeclaration()
.getASourceSupertype*()
.hasQualifiedName("java.util", "Stack") and
this.hasName("push") and

View File

@@ -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
(