diff options
author | Roland McGrath <roland@redhat.com> | 2009-01-27 16:41:54 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2009-01-27 16:41:54 -0800 |
commit | e738ad2e9f2b5a95dfd86f986ee3ebc0fc41f46c (patch) | |
tree | 00019c8b7fec32290be7b222a17dfec05c118bc5 /libdwfl/dwfl_report_elf.c | |
parent | f46272a1a9b79efd294465ebfb8d7da4a2220100 (diff) | |
download | elfutils-e738ad2e9f2b5a95dfd86f986ee3ebc0fc41f46c.tar.gz |
(__libdwfl_report_elf): Ignore trailing PT_LOAD with zero vaddr and memsz.
Diffstat (limited to 'libdwfl/dwfl_report_elf.c')
-rw-r--r-- | libdwfl/dwfl_report_elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index 3482a229..9fc156fe 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -208,7 +208,8 @@ __libdwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, GElf_Phdr phdr_mem, *ph = gelf_getphdr (elf, i, &phdr_mem); if (unlikely (ph == NULL)) goto elf_error; - if (ph->p_type == PT_LOAD) + if (ph->p_type == PT_LOAD + && ph->p_vaddr + ph->p_memsz > 0) { end = base + (ph->p_vaddr + ph->p_memsz); break; |