@@ -19,16 +19,21 @@ class InflateFunction extends DecompressionFunction {
1919}
2020
2121/**
22- * The `next_in` member of a `z_stream` variable is used in flow steps.
22+ * The `next_in` member of a `z_stream` variable is used in a flow steps.
2323 */
24- predicate nextInAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
25- exists ( Variable nextInVar , VariableAccess zStreamAccess |
26- nextInVar .getDeclaringType ( ) .hasName ( "z_stream" ) and
27- nextInVar .hasName ( "next_in" ) and
28- zStreamAccess .getType ( ) .hasName ( "z_stream" )
29- |
30- nextInVar .getAnAccess ( ) .getQualifier ( ) .( VariableAccess ) .getTarget ( ) = zStreamAccess .getTarget ( ) and
31- node1 .asIndirectExpr ( ) = nextInVar .getAnAssignedValue ( ) and
32- node2 .asExpr ( ) = zStreamAccess
33- )
24+ class NextInMemberStep extends DecompressionFlowStep {
25+ NextInMemberStep ( ) { this = "NextInMemberStep" }
26+
27+ override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
28+ exists ( Variable nextInVar , VariableAccess zStreamAccess |
29+ nextInVar .getDeclaringType ( ) .hasName ( "z_stream" ) and
30+ nextInVar .hasName ( "next_in" ) and
31+ zStreamAccess .getType ( ) .hasName ( "z_stream" )
32+ |
33+ nextInVar .getAnAccess ( ) .getQualifier ( ) .( VariableAccess ) .getTarget ( ) =
34+ zStreamAccess .getTarget ( ) and
35+ node1 .asIndirectExpr ( ) = nextInVar .getAnAssignedValue ( ) and
36+ node2 .asExpr ( ) = zStreamAccess
37+ )
38+ }
3439}
0 commit comments