Commit 6be4bcd for zlib
commit 6be4bcda3da1d28b18a081c884b141a88a7cb84d
Author: Mark Adler <git@madler.net>
Date: Mon Oct 26 09:31:04 2026 -0700
Avoid undefined pointer comparisons in gz_vacate().
They had no effect whatsoever, except to annoy sanitizers.
diff --git a/gzwrite.c b/gzwrite.c
index d99e570..32560fe 100644
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -41,8 +41,8 @@ local int gz_init(gz_statep state) {
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
- strm->next_in = NULL;
}
+ strm->next_in = NULL;
/* mark state as initialized */
state->size = state->want;
@@ -259,6 +259,7 @@ local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) {
return state->again ? put - len : 0;
}
} while (len);
+ state->strm.next_in = state->in;
}
/* input was all buffered or compressed */