From: Dario Pavlovic Date: Mon, 9 Sep 2019 23:13:24 +0000 (-0700) Subject: Addressing nits X-Git-Tag: v1.4.4~1^2~59^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea1ad123da7f760cac8d57bbaf81d367af17aebb;p=thirdparty%2Fzstd.git Addressing nits --- diff --git a/tests/fuzz/fuzz_data_producer.h b/tests/fuzz/fuzz_data_producer.h index 4a12e1300..4fcf6fd41 100644 --- a/tests/fuzz/fuzz_data_producer.h +++ b/tests/fuzz/fuzz_data_producer.h @@ -9,6 +9,10 @@ /** * Helper APIs for generating random data from input data stream. + The producer reads bytes from the end of the input and appends them together + to generate a random number in the requested range. If it runs out of input + data, it will keep returning the same value (min) over and over again. + */ #ifndef FUZZ_DATA_PRODUCER_H diff --git a/tests/fuzz/simple_decompress.c b/tests/fuzz/simple_decompress.c index 803f7f865..a68813ee5 100644 --- a/tests/fuzz/simple_decompress.c +++ b/tests/fuzz/simple_decompress.c @@ -31,8 +31,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *src, size_t size) FUZZ_ASSERT(dctx); } - size_t const bufSize = FUZZ_dataProducer_uint32Range(producer, 0, 2 * size); - void* rBuf = malloc(bufSize); + size_t const bufSize = FUZZ_dataProducer_uint32Range(producer, 0, 10 * size); + void *rBuf = malloc(bufSize); FUZZ_ASSERT(rBuf); /* Restrict to remaining data. If we run out of data while generating params,