From dd31ee984f88b4f7e4791f75488771ac1ffdfb2a Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 18 Jan 2017 16:08:25 +0000 Subject: [PATCH] PR/586: Add missing section headers info message. --- src/readelf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/readelf.c b/src/readelf.c index c76a0acc..f920c8ee 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: readelf.c,v 1.127 2015/11/18 12:29:29 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.128 2016/10/04 21:43:10 christos Exp $") #endif #ifdef BUILTIN_ELF @@ -1203,8 +1203,9 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, /* Read offset of name section to be able to read section names later */ if (pread(fd, xsh_addr, xsh_sizeof, CAST(off_t, (off + size * strtab))) < (ssize_t)xsh_sizeof) { - file_badread(ms); - return -1; + if (file_printf(ms, ", missing section headers") == -1) + return -1; + return 0; } name_off = xsh_offset; -- 2.40.0