summaryrefslogtreecommitdiffstats
path: root/libdwfl/elf-from-memory.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2014-02-26 17:17:07 +0100
committerMark Wielaard <[email protected]>2014-02-26 17:18:49 +0100
commit48827ec6cb2169bad15baf7702f86c4bf2847beb (patch)
tree3f055e28ae298bf89260c492b947053741873665 /libdwfl/elf-from-memory.c
parentcb7b2d64b6fdbbb6f18ce07294b2315f60d843bc (diff)
libdwfl: elf-from-memory.c (elf_from_remote_memory): Check against p64 p_type.
There was a type in the case of parsing ELFCLASS64 phdrs. Check against p64 p_type, not the p32 p_type which at a different location in the union. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdwfl/elf-from-memory.c')
-rw-r--r--libdwfl/elf-from-memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdwfl/elf-from-memory.c b/libdwfl/elf-from-memory.c
index 528c35f4..7d35df6a 100644
--- a/libdwfl/elf-from-memory.c
+++ b/libdwfl/elf-from-memory.c
@@ -301,7 +301,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma,
case ELFCLASS64:
for (uint_fast16_t i = 0; i < phnum; ++i)
- if (phdrs.p32[i].p_type == PT_LOAD)
+ if (phdrs.p64[i].p_type == PT_LOAD)
if (handle_segment (phdrs.p64[i].p_vaddr, phdrs.p64[i].p_offset,
phdrs.p64[i].p_filesz, phdrs.p64[i].p_align))
goto read_error;