From: Bimba Shrestha Date: Wed, 16 Oct 2019 23:26:46 +0000 (-0700) Subject: Removing unnecessary check from decode side X-Git-Tag: v1.4.4~1^2~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83749411a65bda3c2075253ac740b3ffb5ea6c5f;p=thirdparty%2Fzstd.git Removing unnecessary check from decode side --- diff --git a/doc/educational_decoder/zstd_decompress.c b/doc/educational_decoder/zstd_decompress.c index f3e1b848f..53ac52e42 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(); }