summaryrefslogtreecommitdiffstats
path: root/libdwfl/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/open.c')
-rw-r--r--libdwfl/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdwfl/open.c b/libdwfl/open.c
index 611295f2..0ab2a9d2 100644
--- a/libdwfl/open.c
+++ b/libdwfl/open.c
@@ -75,6 +75,8 @@ decompress (int fd __attribute__ ((unused)), Elf **elf)
void *const mapped = ((*elf)->map_address == NULL ? NULL
: (*elf)->map_address + (*elf)->start_offset);
const size_t mapped_size = (*elf)->maximum_size;
+ if (mapped_size == 0)
+ return error;
error = __libdw_gunzip (fd, offset, mapped, mapped_size, &buffer, &size);
if (error == DWFL_E_BADELF)