summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/readelf.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 26920df1..bb45f826 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-15 Roland McGrath <[email protected]>
+
+ * readelf.c (print_debug): Fix brainos in SHDR test.
+
2007-02-05 Roland McGrath <[email protected]>
* ar.c: Include <limits.h>, since we use LONG_MAX.
diff --git a/src/readelf.c b/src/readelf.c
index fd61b369..ab276ec6 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -4953,7 +4953,7 @@ print_debug (Ebl *ebl, GElf_Ehdr *ehdr)
GElf_Shdr shdr_mem;
GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
- if (shdr != NULL || shdr->sh_type != SHT_PROGBITS)
+ if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
{
static const struct
{