From 83749411a65bda3c2075253ac740b3ffb5ea6c5f Mon Sep 17 00:00:00 2001 From: Bimba Shrestha Date: Wed, 16 Oct 2019 16:26:46 -0700 Subject: [PATCH] Removing unnecessary check from decode side --- doc/educational_decoder/zstd_decompress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/educational_decoder/zstd_decompress.c b/doc/educational_decoder/zstd_decompress.c index f3e1b848..53ac52e4 100644 --- a/doc/educational_decoder/zstd_decompress.c +++ b/doc/educational_decoder/zstd_decompress.c @@ -856,8 +856,7 @@ static size_t decode_literals_compressed(frame_context_t *const ctx, // Impossible IMPOSSIBLE(); } - if (regenerated_size > MAX_LITERALS_SIZE || - compressed_size >= regenerated_size) { + if (regenerated_size > MAX_LITERALS_SIZE) { CORRUPTION(); }