]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix memory corruption introduced in 61e181c8ae93dbf56040336179c9954078bd1399
authorRye Mutt <rye@alchemyviewer.org>
Thu, 28 Dec 2023 02:38:00 +0000 (21:38 -0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 29 Dec 2023 14:52:14 +0000 (15:52 +0100)
inflate.c

index af5abf11a51bb3049944e4a70d90feb0ccfcadcb..fe55c498e3122c48acde65e273951ea9e0b280b5 100644 (file)
--- 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;