]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix too strict assert
authorNick Terrell <terrelln@fb.com>
Fri, 20 Sep 2019 08:23:35 +0000 (01:23 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 20 Sep 2019 08:23:35 +0000 (01:23 -0700)
lib/compress/zstd_compress_internal.h

index 579bd5d43470dc68380d193a50c84e206d76a106..bc654bcc97997709164a326f4b7e457a71639d6c 100644 (file)
@@ -360,10 +360,8 @@ MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const B
     /* copy Literals */
     assert(seqStorePtr->maxNbLit <= 128 KB);
     assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + seqStorePtr->maxNbLit);
-    /* We are guaranteed at least 8 bytes of literals space because of HASH_READ_SIZE and
-     * MINMATCH.
-     */
-    assert(litLimit - literals >= HASH_READ_SIZE + MINMATCH);
+    /* We are guaranteed at least 8 bytes of literals space because of HASH_READ_SIZE. */
+    assert(litLimit - literals >= HASH_READ_SIZE);
     if (litLimit - literals >= WILDCOPY_OVERLENGTH)
            ZSTD_wildcopy(seqStorePtr->lit, literals, (ptrdiff_t)litLength, ZSTD_no_overlap);
     else