]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Initialize block_open state
authorPhil Vachon <pvachon@12sidedtech.com>
Mon, 30 Jan 2017 14:32:29 +0000 (15:32 +0100)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Mon, 13 Feb 2017 09:16:55 +0000 (10:16 +0100)
On deflation context creation, initialize the block_open state to 0 to
ensure that no uninitialized values are used.

deflate.c

index ce4b0e6ab87aa9b049ee89a834a5ce01ff31f349..21d4f414cfc43774fd17039121987e3a7db8bb1e 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -330,6 +330,7 @@ int ZEXPORT deflateInit2_(z_stream *strm, int level, int method, int windowBits,
     s->level = level;
     s->strategy = strategy;
     s->method = (unsigned char)method;
+    s->block_open = 0;
 
     return deflateReset(strm);
 }