From 12384c3aff4fb433042cf8fc4f4949d744535531 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Dec 1997 18:18:02 +0000 Subject: [PATCH] Checker showed that zlib was using a element of its internal state structure without initialising it. Although it looks harmless I've added a bzero() to make absolutely sure that the code behaves consistently across platforms. --- lib/zlib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/zlib.c b/lib/zlib.c index c9f7ff5b..9d732bb7 100644 --- a/lib/zlib.c +++ b/lib/zlib.c @@ -600,6 +600,7 @@ int deflateInit2 (strm, level, method, windowBits, memLevel, strategy) } s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); if (s == Z_NULL) return Z_MEM_ERROR; + bzero(s, sizeof(*s)); strm->state = (struct internal_state FAR *)s; s->strm = strm; -- 2.34.1