fixed heaap corruptions

This commit is contained in:
Stanislav Klima
2023-02-21 11:01:50 +01:00
parent e0abb0e306
commit 208056b2da

View File

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