summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-01-27 16:41:54 -0800
committerRoland McGrath <[email protected]>2009-01-27 16:41:54 -0800
commite738ad2e9f2b5a95dfd86f986ee3ebc0fc41f46c (patch)
tree00019c8b7fec32290be7b222a17dfec05c118bc5
parentf46272a1a9b79efd294465ebfb8d7da4a2220100 (diff)
(__libdwfl_report_elf): Ignore trailing PT_LOAD with zero vaddr and memsz.
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/dwfl_report_elf.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 5490f5f0..aafa1c92 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-27 Roland McGrath <[email protected]>
+
+ * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
+ with zero vaddr and memsz.
+
2009-01-22 Roland McGrath <[email protected]>
* open.c (decompress): Move BUFFER, SIZE decls outside #if.
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;