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.
This commit is contained in:
jwhitelock 2016-07-04 14:59:34 -04:00 committed by Paul Sokolovsky
parent ee2f58d04c
commit 347295ece3

View file

@ -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);