projects
/
platform
/
upstream
/
elfutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5199e15
)
unstrip: Add ELF_CHECK to make sure gelf_getehdr () doesn't return NULL.
author
Mark Wielaard
<mark@klomp.org>
Fri, 2 Nov 2018 22:17:05 +0000
(23:17 +0100)
committer
Mark Wielaard
<mark@klomp.org>
Fri, 2 Nov 2018 22:17:05 +0000
(23:17 +0100)
Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
patch
|
blob
|
history
src/unstrip.c
patch
|
blob
|
history
diff --git
a/src/ChangeLog
b/src/ChangeLog
index
758534d
..
ca1533d
100644
(file)
--- a/
src/ChangeLog
+++ b/
src/ChangeLog
@@
-1,3
+1,8
@@
+2018-11-02 Mark Wielaard <mark@klomp.org>
+
+ * unstrip.c (copy_elf): Add ELF_CHECK to make sure gelf_getehdr ()
+ doesn't return NULL.
+
2018-10-18 Mark Wielaard <mark@klomp.org>
* elflint.c (check_note_data): Recognize NT_GNU_PROPERTY_TYPE_0.
diff --git
a/src/unstrip.c
b/src/unstrip.c
index
32da89d
..
3495b1d
100644
(file)
--- a/
src/unstrip.c
+++ b/
src/unstrip.c
@@
-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