diff options
Diffstat (limited to 'ossfuzz/round_trip_fuzzer.c')
-rw-r--r-- | ossfuzz/round_trip_fuzzer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ossfuzz/round_trip_fuzzer.c b/ossfuzz/round_trip_fuzzer.c index e37a0a6..85774fe 100644 --- a/ossfuzz/round_trip_fuzzer.c +++ b/ossfuzz/round_trip_fuzzer.c @@ -15,7 +15,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); - size_t const partialCapacity = FUZZ_dataProducer_uint32(producer, 0, size); + size_t const partialCapacitySeed = FUZZ_dataProducer_uint32_seed(producer, 0, size); + size_t const partialCapacity = FUZZ_dataProducer_uint32(partialCapacitySeed, + 0, FUZZ_dataProducer_remainingBytes(producer)); size_t const dstCapacity = LZ4_compressBound(size); char* const dst = (char*)malloc(dstCapacity); char* const rt = (char*)malloc(size); |