From: Wayne Davison Date: Tue, 9 Aug 2022 03:05:10 +0000 (-0700) Subject: A fix for the zlib fix. X-Git-Tag: v3.2.5pre2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e2921fce8c518e370c324407d35bc83ba12f2d5;p=thirdparty%2Frsync.git A fix for the zlib fix. --- diff --git a/zlib/inflate.c b/zlib/inflate.c index d15132ea..e9840b67 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -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);