From 599e94f9705374593acf323e72e358d195729374 Mon Sep 17 00:00:00 2001 From: Oldes Date: Sat, 28 Mar 2020 18:41:46 +0100 Subject: [PATCH] FIX: enhance max decompression limit for Zlib --- src/core/u-compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/u-compress.c b/src/core/u-compress.c index 7ac805c182..73181870ed 100644 --- a/src/core/u-compress.c +++ b/src/core/u-compress.c @@ -181,7 +181,7 @@ void Trap_ZStream_Error(z_stream *stream, int err, REBOOL while_compression) // Get the uncompressed size from last 4 source data bytes. if (len < 4) Trap0(RE_PAST_END); // !!! better msg needed size = cast(REBU64, Bytes_To_REBCNT(BIN_SKIP(input, len) - sizeof(REBCNT))); - if (size > len * 10) Trap_Num(RE_SIZE_LIMIT, size); // check for a realistic limit + if (size > len * 14) Trap_Num(RE_SIZE_LIMIT, size); // check for a realistic limit } output = Make_Binary(size);