Using size instead of LZ4_compressBound(size) <- causes heap overflow

This commit is contained in:
Bimba Shrestha 2019-09-23 11:54:56 -07:00
parent d5ceafd411
commit 192161e97e

View File

@ -17,7 +17,7 @@
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, LZ4_compressBound(size));
FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size);
LZ4F_preferences_t const prefs = FUZZ_dataProducer_preferences(producer);
size_t const dstCapacitySeed = FUZZ_dataProducer_retrieve32(producer);
size = FUZZ_dataProducer_remainingBytes(producer);