diff --git a/wolfcrypt/src/compress.c b/wolfcrypt/src/compress.c index 8de92a13a..766e0c912 100644 --- a/wolfcrypt/src/compress.c +++ b/wolfcrypt/src/compress.c @@ -286,7 +286,7 @@ int wc_DeCompressDynamic(byte** out, int maxSz, int memoryType, XFREE(tmp, heap, memoryType); tmp = newTmp; stream.next_out = tmp + stream.total_out; - stream.avail_out = stream.avail_out + (uInt)tmpSz; + stream.avail_out = stream.avail_out + (uInt)inSz; tmpSz = newSz; result = inflate(&stream, Z_BLOCK); }