From 67b1f5fc72cd23433e9dbdfcdaae1773c1e805b8 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Fri, 20 Sep 2019 01:23:35 -0700 Subject: [PATCH] Fix too strict assert --- lib/compress/zstd_compress_internal.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/compress/zstd_compress_internal.h b/lib/compress/zstd_compress_internal.h index 579bd5d43..bc654bcc9 100644 --- a/lib/compress/zstd_compress_internal.h +++ b/lib/compress/zstd_compress_internal.h @@ -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