]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Removing unnecessary check from decode side 1828/head
authorBimba Shrestha <bimbashrestha@fb.com>
Wed, 16 Oct 2019 23:26:46 +0000 (16:26 -0700)
committerBimba Shrestha <bimbashrestha@fb.com>
Wed, 16 Oct 2019 23:26:46 +0000 (16:26 -0700)
doc/educational_decoder/zstd_decompress.c

index f3e1b848f49d233766c14c6417ba833935f6abe2..53ac52e422c797e414100a2318075e30376c3d1d 100644 (file)
@@ -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();
     }