Skip to content

Commit

Permalink
unstrip: Add ELF_CHECK to make sure gelf_getehdr () doesn't return NULL.
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Wielaard <[email protected]>
  • Loading branch information
Mark Wielaard committed Nov 2, 2018
1 parent 5199e15 commit e574889
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-11-02 Mark Wielaard <[email protected]>

* unstrip.c (copy_elf): Add ELF_CHECK to make sure gelf_getehdr ()
doesn't return NULL.

2018-10-18 Mark Wielaard <[email protected]>

* elflint.c (check_note_data): Recognize NT_GNU_PROPERTY_TYPE_0.
1 change: 1 addition & 0 deletions src/unstrip.c
Original file line number Diff line number Diff line change
@@ -245,6 +245,7 @@ copy_elf (Elf *outelf, Elf *inelf)

GElf_Ehdr ehdr_mem;
GElf_Ehdr *ehdr = gelf_getehdr (inelf, &ehdr_mem);
ELF_CHECK (ehdr != NULL, _("cannot get ELF header: %s"));
if (shstrndx < SHN_LORESERVE)
ehdr->e_shstrndx = shstrndx;
else

0 comments on commit e574889

Please sign in to comment.