From 208056b2da94115844beb44b689a4e8d75d22a85 Mon Sep 17 00:00:00 2001 From: Stanislav Klima Date: Tue, 21 Feb 2023 11:01:50 +0100 Subject: [PATCH] fixed heaap corruptions --- wolfcrypt/src/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }