Commit a57149e1 authored by Alexandre Julliard's avatar Alexandre Julliard

Check ELF signature before processing file.

parent 5076dbaa
......@@ -1229,6 +1229,8 @@ static enum DbgInfoLoad DEBUG_ProcessElfFile(const char* filename,
* table.
*/
ehptr = (Elf32_Ehdr*) addr;
if (memcmp( ehptr->e_ident, ELFMAG, SELFMAG )) goto leave;
spnt = (Elf32_Shdr*) (addr + ehptr->e_shoff);
shstrtab = (addr + spnt[ehptr->e_shstrndx].sh_offset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment