]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
eblsectionstripp.c (ebl_section_strip_p): Check shdr_l is not NULL.
authorMark Wielaard <mjw@redhat.com>
Wed, 25 Sep 2013 11:02:53 +0000 (13:02 +0200)
committerMark Wielaard <mjw@redhat.com>
Wed, 25 Sep 2013 11:02:53 +0000 (13:02 +0200)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
libebl/ChangeLog
libebl/eblsectionstripp.c

index 78f6b69db7c443e21432a48c52b774995318e802..623bdbaae3d9ac463f99cb2ed572ea8bf001cdf3 100644 (file)
@@ -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.
index 949706820889af523ba03356757cfe25bd50293a..c6cda63a29c325857f87fcd69b4ea148dfb41015 100644 (file)
@@ -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);