]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
A fix for the zlib fix.
authorWayne Davison <wayne@opencoder.net>
Tue, 9 Aug 2022 03:05:10 +0000 (20:05 -0700)
committerWayne Davison <wayne@opencoder.net>
Tue, 9 Aug 2022 03:05:10 +0000 (20:05 -0700)
zlib/inflate.c

index d15132eaf04ab4d177cb40a8480ab1ced8ab6082..e9840b67918e5ee9b4f3e15c3d2f964125b055c3 100644 (file)
@@ -739,10 +739,10 @@ int flush;
                 copy = state->length;
                 if (copy > have) copy = have;
                 if (copy) {
-                    len = state->head->extra_len - state->length;
                     if (state->head != Z_NULL &&
                         state->head->extra != Z_NULL &&
-                        len < state->head->extra_max) {
+                        (len = state->head->extra_len - state->length) <
+                            state->head->extra_max) {
                         zmemcpy(state->head->extra + len, next,
                                 len + copy > state->head->extra_max ?
                                 state->head->extra_max - len : copy);