summaryrefslogtreecommitdiffstats
path: root/ossfuzz/round_trip_frame_fuzzer.c
diff options
context:
space:
mode:
authorBimba Shrestha <bshrestha.msae@gmail.com>2019-09-14 01:08:58 (GMT)
committerBimba Shrestha <bshrestha.msae@gmail.com>2019-09-14 01:08:58 (GMT)
commit8edc5879d029459074a9c7bd9489dabf5b510bf6 (patch)
tree268103dc5f2eeda8e0ed6343d4e33b1249ca5613 /ossfuzz/round_trip_frame_fuzzer.c
parent9cb73d69c4d92e255826dfee47e46a6815955ee4 (diff)
downloadlz4-8edc5879d029459074a9c7bd9489dabf5b510bf6.zip
lz4-8edc5879d029459074a9c7bd9489dabf5b510bf6.tar.gz
lz4-8edc5879d029459074a9c7bd9489dabf5b510bf6.tar.bz2
Retreiving 32 bits from the end for fuzzer
Diffstat (limited to 'ossfuzz/round_trip_frame_fuzzer.c')
-rw-r--r--ossfuzz/round_trip_frame_fuzzer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ossfuzz/round_trip_frame_fuzzer.c b/ossfuzz/round_trip_frame_fuzzer.c
index aea13bb..149542d 100644
--- a/ossfuzz/round_trip_frame_fuzzer.c
+++ b/ossfuzz/round_trip_frame_fuzzer.c
@@ -18,10 +18,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
FUZZ_dataProducer_t* producer = FUZZ_dataProducer_create(data, size);
LZ4F_preferences_t const prefs = FUZZ_dataProducer_preferences(producer);
-
size = FUZZ_dataProducer_remainingBytes(producer);
- size_t const dstCapacity = LZ4F_compressFrameBound(LZ4_compressBound(size), &prefs);
+ size_t const dstCapacity = LZ4F_compressFrameBound(LZ4_compressBound(size), &prefs);
char* const dst = (char*)malloc(dstCapacity);
char* const rt = (char*)malloc(FUZZ_dataProducer_remainingBytes(producer));