diff options
Diffstat (limited to 'ossfuzz/compress_fuzzer.c')
-rw-r--r-- | ossfuzz/compress_fuzzer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ossfuzz/compress_fuzzer.c b/ossfuzz/compress_fuzzer.c index 9d72e72..76d227e 100644 --- a/ossfuzz/compress_fuzzer.c +++ b/ossfuzz/compress_fuzzer.c @@ -16,8 +16,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); - size_t const dstCapacity = FUZZ_dataProducer_uint32( - producer, 0, LZ4_compressBound(size)); + size_t const dstCapacitySeed = FUZZ_dataProducer_uint32_seed(producer, 0, LZ4_compressBound(size)); + size_t const dstCapacity = FUZZ_dataProducer_uint32(dstCapacitySeed, + 0, LZ4_compressBound(FUZZ_dataProducer_remainingBytes(producer))); char* const dst = (char*)malloc(dstCapacity); char* const rt = (char*)malloc(size); |