From 98f4698e81e6d06653201639cf9a75c3c1464884 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sun, 25 Jul 2021 15:36:22 +0100 Subject: [PATCH] Fix use of uninitialized memory in tinfl_decompress_mem_to_callback() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sezero Petr Písař: Ported to 2.2.0. Signed-off-by: Petr Písař --- miniz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/miniz.c b/miniz.c index 87bdedb..af27389 100644 --- a/miniz.c +++ b/miniz.c @@ -2916,6 +2916,7 @@ int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, size_t in_buf_ofs = 0, dict_ofs = 0; if (!pDict) return TINFL_STATUS_FAILED; + memset(pDict,0,TINFL_LZ_DICT_SIZE); tinfl_init(&decomp); for (;;) { -- 2.34.1