Package: zlib1g
Version: 1:1.2.3.4.dfsg-3
Hi,
this patch (backported from 1.2.5) prevents an uninitialized memory
access during inflateInit() call, when state->window is NULL, but
state->wbits is still not initialized. The patch only swaps two
comparisons without side effects.
This is frequently reported by Valgrind, as zlib is commonly used.
--- inflate.c~ 2009-12-24 16:09:43.000000000 +0100
+++ inflate.c 2010-09-19 19:46:10.393781334 +0200
@@ -154,7 +154,7 @@
/* set number of window bits, free window if different */
if (windowBits < 8 || windowBits > 15)
return Z_STREAM_ERROR;
- if (state->wbits != windowBits && state->window != Z_NULL) {
+ if (state->window != Z_NULL && state->wbits != windowBits) {
ZFREE(strm, state->window);
state->window = Z_NULL;
}
--
Jindrich Makovicka
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]