diff options
| author | Mark Wielaard <mjw@redhat.com> | 2013-09-25 13:02:53 +0200 |
|---|---|---|
| committer | Mark Wielaard <mjw@redhat.com> | 2013-09-25 13:02:53 +0200 |
| commit | 2cfec29465e4d1882256f85eb92bbde4a9bdedbe (patch) | |
| tree | 41869f0aaa89199f08c61a0fcc040ef48f28b161 /libebl | |
| parent | 1b734df17fca9f89a887b85ffe74616a87388f51 (diff) | |
| download | platform_external_elfutils-2cfec29465e4d1882256f85eb92bbde4a9bdedbe.tar.gz platform_external_elfutils-2cfec29465e4d1882256f85eb92bbde4a9bdedbe.tar.bz2 platform_external_elfutils-2cfec29465e4d1882256f85eb92bbde4a9bdedbe.zip | |
eblsectionstripp.c (ebl_section_strip_p): Check shdr_l is not NULL.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libebl')
| -rw-r--r-- | libebl/ChangeLog | 4 | ||||
| -rw-r--r-- | libebl/eblsectionstripp.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog index 78f6b69d..623bdbaa 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,7 @@ +2013-09-25 Mark Wielaard <mjw@redhat.com> + + * eblsectionstripp.c (ebl_section_strip_p): Check shdr_l is not NULL. + 2013-04-24 Mark Wielaard <mjw@redhat.com> * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. diff --git a/libebl/eblsectionstripp.c b/libebl/eblsectionstripp.c index 94970682..c6cda63a 100644 --- a/libebl/eblsectionstripp.c +++ b/libebl/eblsectionstripp.c @@ -1,5 +1,5 @@ /* Check whether section can be stripped. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2013 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -51,7 +51,7 @@ ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr, Elf_Scn *scn_l = elf_getscn (ebl->elf, (shdr)->sh_info); GElf_Shdr shdr_mem_l; GElf_Shdr *shdr_l = gelf_getshdr (scn_l, &shdr_mem_l); - if (shdr_l == NULL) + if (shdr_l != NULL) { const char *s_l = elf_strptr (ebl->elf, ehdr->e_shstrndx, shdr_l->sh_name); |
