]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix minor bug in sequence_compression_api tester 3103/head
authorYann Collet <cyan@fb.com>
Tue, 29 Mar 2022 23:45:09 +0000 (16:45 -0700)
committerYann Collet <cyan@fb.com>
Tue, 29 Mar 2022 23:45:09 +0000 (16:45 -0700)
margin was merely slightly too short for extra splitting.

tests/fuzz/sequence_compression_api.c

index 4a09d27fb4745c36da4df5ded2486dbebe41c7c7..cc872a08125525998e6c960c3093e751c3fdf8cf 100644 (file)
@@ -153,7 +153,7 @@ static size_t generateRandomSequences(FUZZ_dataProducer_t* producer,
         matchLengthMax = MIN(matchLengthMax, blockSizeMax/2);
     }
 
-    while ( nbSeqGenerated < ZSTD_FUZZ_MAX_NBSEQ-2 /* extra room for explicit delimiters */
+    while ( nbSeqGenerated < ZSTD_FUZZ_MAX_NBSEQ - 3 /* extra room for explicit delimiters */
          && bytesGenerated < ZSTD_FUZZ_GENERATED_SRC_MAXSIZE
          && !FUZZ_dataProducer_empty(producer)) {
         uint32_t matchLength;