Commit ff7fe986 authored by Mark Wielaard's avatar Mark Wielaard
Browse files

libelf: Handle zero size decompressed data.

This is a corner case that will most likely never occur in practice,
but we have several testcases that compress and decompress zero sized
data. In that case during decompression we might malloc a buffer of
size zero. It is allowed for malloc to return NULL in that case. But
we do need a non-NULL buffer to return and set as result. So make sure
to always at least allocate one byte. Also make sure that we don't
allocate a zero sized conversion buffer for the data.

https://sourceware.org/bugzilla/show_bug.cgi?id=24000



Signed-off-by: default avatarMark Wielaard <mark@klomp.org>
parent 1e52d4ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment