From: Rye Mutt Date: Thu, 28 Dec 2023 02:38:00 +0000 (-0500) Subject: Fix memory corruption introduced in 61e181c8ae93dbf56040336179c9954078bd1399 X-Git-Tag: 2.1.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a61926d3f9bf08c5429613b75f6c3d87ac37b8aa;p=thirdparty%2Fzlib-ng.git Fix memory corruption introduced in 61e181c8ae93dbf56040336179c9954078bd1399 --- diff --git a/inflate.c b/inflate.c index af5abf11..fe55c498 100644 --- a/inflate.c +++ b/inflate.c @@ -1350,8 +1350,8 @@ int32_t Z_EXPORT PREFIX(inflateCopy)(PREFIX3(stream) *dest, PREFIX3(stream) *sou copy->next = copy->codes + (state->next - state->codes); /* window */ + copy->window = NULL; if (state->window != NULL) { - copy->window = NULL; if (PREFIX(inflate_ensure_window)(copy)) { ZFREE_STATE(source, copy); return Z_MEM_ERROR;