Add cSize regression test to fuzzer.c
This commit is contained in:
@@ -575,6 +575,8 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
||||
BYTE const* const iend = istart + srcSize;
|
||||
/* Input positions */
|
||||
BYTE const* ip = istart;
|
||||
|
||||
/* If using opt parser, use LDMs only as candidates rather than always accepting them */
|
||||
if (cParams->strategy >= ZSTD_btopt) {
|
||||
size_t lastLLSize;
|
||||
ms->ldmSeqStore = *rawSeqStore;
|
||||
|
||||
@@ -774,7 +774,9 @@ FORCE_INLINE_TEMPLATE U32 ZSTD_BtGetAllMatches (
|
||||
static void ZSTD_opt_skipBytesInLdmSeqStore(rawSeqStore_t* ldmSeqStore, size_t nbBytes) {
|
||||
while (nbBytes && ldmSeqStore->pos < ldmSeqStore->size) {
|
||||
rawSeq currSeq = ldmSeqStore->seq[ldmSeqStore->pos];
|
||||
/* posInSequence necessarily must never represent a value beyond the sequence */
|
||||
assert(ldmSeqStore->posInSequence <= currSeq.matchLength + currSeq.litLength);
|
||||
|
||||
if (nbBytes <= currSeq.litLength) {
|
||||
ldmSeqStore->posInSequence += nbBytes;
|
||||
return;
|
||||
@@ -782,6 +784,7 @@ static void ZSTD_opt_skipBytesInLdmSeqStore(rawSeqStore_t* ldmSeqStore, size_t n
|
||||
ldmSeqStore->posInSequence += currSeq.litLength;
|
||||
nbBytes -= currSeq.litLength;
|
||||
}
|
||||
|
||||
if (nbBytes < currSeq.matchLength) {
|
||||
ldmSeqStore->posInSequence += nbBytes;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user