Forgot to check the endian of the ELF header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5053 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,6 +29,7 @@ verify_elf_header(struct Elf32_Ehdr &header)
|
|||||||
if (memcmp(header.e_ident, ELF_MAGIC, 4) != 0
|
if (memcmp(header.e_ident, ELF_MAGIC, 4) != 0
|
||||||
|| header.e_ident[4] != ELFCLASS32
|
|| header.e_ident[4] != ELFCLASS32
|
||||||
|| header.e_phoff == 0
|
|| header.e_phoff == 0
|
||||||
|
|| !header.IsHostEndian()
|
||||||
|| header.e_phentsize != sizeof(struct Elf32_Phdr))
|
|| header.e_phentsize != sizeof(struct Elf32_Phdr))
|
||||||
return B_BAD_TYPE;
|
return B_BAD_TYPE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user