diff options
author | Bimba Shrestha <bshrestha.msae@gmail.com> | 2019-09-14 01:08:58 (GMT) |
---|---|---|
committer | Bimba Shrestha <bshrestha.msae@gmail.com> | 2019-09-14 01:08:58 (GMT) |
commit | 8edc5879d029459074a9c7bd9489dabf5b510bf6 (patch) | |
tree | 268103dc5f2eeda8e0ed6343d4e33b1249ca5613 /ossfuzz/decompress_fuzzer.c | |
parent | 9cb73d69c4d92e255826dfee47e46a6815955ee4 (diff) | |
download | lz4-8edc5879d029459074a9c7bd9489dabf5b510bf6.zip lz4-8edc5879d029459074a9c7bd9489dabf5b510bf6.tar.gz lz4-8edc5879d029459074a9c7bd9489dabf5b510bf6.tar.bz2 |
Retreiving 32 bits from the end for fuzzer
Diffstat (limited to 'ossfuzz/decompress_fuzzer.c')
-rw-r--r-- | ossfuzz/decompress_fuzzer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ossfuzz/decompress_fuzzer.c b/ossfuzz/decompress_fuzzer.c index c2595b0..6f48e30 100644 --- a/ossfuzz/decompress_fuzzer.c +++ b/ossfuzz/decompress_fuzzer.c @@ -15,11 +15,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); - size_t const dstCapacitySeed = FUZZ_dataProducer_uint32(producer, 0, 4 * size); - + size_t const dstCapacitySeed = FUZZ_dataProducer_retrieve32(producer); size = FUZZ_dataProducer_remainingBytes(producer); - size_t const dstCapacity = FUZZ_getRange_from_uint32(dstCapacitySeed, 0, 4 * size); + size_t const dstCapacity = FUZZ_getRange_from_uint32(dstCapacitySeed, 0, 4 * size); size_t const smallDictSize = size + 1; size_t const largeDictSize = 64 * 1024 - 1; size_t const dictSize = MAX(smallDictSize, largeDictSize); |