Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Symptom: Unnecessary huge memory allocation (4GB) for tiny malformed file (21 bytes).
This smells like a bug, because (1)
I can attach an input here to repro if required. Please confirm if this is indeed a bug.
Found by: Fuzzing with FuzzFactory
Unzip the file "huge.lz4" (21 bytes) from the attachment. Detailed repro with valgrind:
Looking more carefully at the code, I see two obvious issues:
Of course, the above changes would not prevent us trying to allocate ~4GB, since the test file here does actually specify that the following block is that big. I suspect that we should also verify that