From 347295ece335f745e74a87a1432caecdc5bcc60a Mon Sep 17 00:00:00 2001 From: jwhitelock Date: Mon, 4 Jul 2016 14:59:34 -0400 Subject: [PATCH] tinf_zlib_uncompress(): Set d.destSize, not d.destRemaining. destRemaining was set instead of destSize, this caused the destRemaining to be re-initialized in follow-up call to tinf_uncompress_dyn() function with destSize which was uninitialized. --- src/tinfzlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tinfzlib.c b/src/tinfzlib.c index dbacc1d..ea21a16 100644 --- a/src/tinfzlib.c +++ b/src/tinfzlib.c @@ -43,7 +43,7 @@ int tinf_zlib_uncompress(void *dest, unsigned int *destLen, d.source = (const unsigned char *)source; d.destStart = (unsigned char *)dest; - d.destRemaining = *destLen; + d.destSize = *destLen; res = tinf_zlib_uncompress_dyn(&d, sourceLen);