Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sstrip/sstrip.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ static int readphdrtable(void)
{
if (!ehdr.e_phoff || !ehdr.e_phnum)
return err("ELF file has no program header table.");
if (fseek(thefile, ehdr.e_phoff, SEEK_SET))
return err("could not seek to program segment header table in file.");

if (!(phdrs = realloc(phdrs, ehdr.e_phnum * sizeof *phdrs)))
return err("Out of memory!");
Expand Down