From f34508a3a6aaba2c4acf31e5590245624a8beb4a Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 18 Jan 2017 16:08:25 +0000 Subject: 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 90dae392..2752ffa7 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.128 2016/10/04 21:43:10 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.129 2017/01/18 16:08:25 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; -- cgit v1.2.1