mirror of
https://github.com/github/codeql.git
synced 2026-03-04 22:56:47 +01:00
Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
@@ -13,13 +13,17 @@ private import semmle.code.java.dataflow.FlowSteps
|
||||
*/
|
||||
private class InputStreamWrapperAnonymousStep extends AdditionalTaintStep {
|
||||
override predicate step(DataFlow::Node n1, DataFlow::Node n2) {
|
||||
exists(Method m, AnonymousClass wrapper |
|
||||
exists(Method m, NestedClass wrapper |
|
||||
m.hasName("read") and
|
||||
m.getDeclaringType() = wrapper and
|
||||
wrapper.getASourceSupertype+() instanceof TypeInputStream
|
||||
|
|
||||
n1.(DataFlow::PostUpdateNode).getPreUpdateNode().asExpr() = m.getParameter(0).getAnAccess() and
|
||||
n2.asExpr() = wrapper.getClassInstanceExpr()
|
||||
n2.asExpr()
|
||||
.(ClassInstanceExpr)
|
||||
.getConstructedType()
|
||||
.getASourceSupertype*()
|
||||
.getSourceDeclaration() = wrapper
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user