diff options
| author | Ulrich Drepper <[email protected]> | 2009-02-10 12:55:07 -0800 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2009-02-10 12:55:07 -0800 |
| commit | a9d51bfe57609a2623ba4c626454456c4310bec9 (patch) | |
| tree | 35429d6091c1a97a7e27bca181b8dc7966d07406 /libdwfl/open.c | |
| parent | 973a9c7c91b8bb0ace3f896d3b543dfa5466f27f (diff) | |
Fix crash in libdw with empty input files.
Diffstat (limited to 'libdwfl/open.c')
| -rw-r--r-- | libdwfl/open.c | 2 |
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) |
