Skip to content

Commit 401bb24

Browse files
committed
remove redundent zStreamAccess in flow steps
1 parent faef635 commit 401bb24

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-409/ZlibInflator.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ class NextInMemberStep extends DecompressionFlowStep {
2525
NextInMemberStep() { this = "NextInMemberStep" }
2626

2727
override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
28-
exists(Variable nextInVar, VariableAccess zStreamAccess |
28+
exists(Variable nextInVar |
2929
nextInVar.getDeclaringType().hasName("z_stream") and
30-
nextInVar.hasName("next_in") and
31-
zStreamAccess.getType().hasName("z_stream")
30+
nextInVar.hasName("next_in")
3231
|
33-
nextInVar.getAnAccess().getQualifier().(VariableAccess).getTarget() =
34-
zStreamAccess.getTarget() and
3532
node1.asIndirectExpr() = nextInVar.getAnAssignedValue() and
36-
node2.asExpr() = zStreamAccess
33+
node2.asExpr() =
34+
nextInVar.getAnAccess().getQualifier().(VariableAccess).getTarget().getAnAccess()
3735
)
3836
}
3937
}

0 commit comments

Comments
 (0)