mirror of
https://github.com/facebook/zstd.git
synced 2025-11-30 11:21:33 +03:00
Fix too strict assert
This commit is contained in:
@@ -360,10 +360,8 @@ MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const B
|
|||||||
/* copy Literals */
|
/* copy Literals */
|
||||||
assert(seqStorePtr->maxNbLit <= 128 KB);
|
assert(seqStorePtr->maxNbLit <= 128 KB);
|
||||||
assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + seqStorePtr->maxNbLit);
|
assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + seqStorePtr->maxNbLit);
|
||||||
/* We are guaranteed at least 8 bytes of literals space because of HASH_READ_SIZE and
|
/* We are guaranteed at least 8 bytes of literals space because of HASH_READ_SIZE. */
|
||||||
* MINMATCH.
|
assert(litLimit - literals >= HASH_READ_SIZE);
|
||||||
*/
|
|
||||||
assert(litLimit - literals >= HASH_READ_SIZE + MINMATCH);
|
|
||||||
if (litLimit - literals >= WILDCOPY_OVERLENGTH)
|
if (litLimit - literals >= WILDCOPY_OVERLENGTH)
|
||||||
ZSTD_wildcopy(seqStorePtr->lit, literals, (ptrdiff_t)litLength, ZSTD_no_overlap);
|
ZSTD_wildcopy(seqStorePtr->lit, literals, (ptrdiff_t)litLength, ZSTD_no_overlap);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user