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 <mjw@redhat.com>
+2014-02-26 Mark Wielaard <mjw@redhat.com>
+
+ * elf-from-memory.c (elf_from_remote_memory): Check against p64
+ p_type in case ELFCLASS64, not against p32 p_type.
+
2014-01-17 Petr Machata <pmachata@redhat.com>
* relocate.c (relocate_section): Use gelf_fsize instead of relying
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;