diff options
author | Christos Zoulas <christos@zoulas.com> | 2017-01-18 16:08:25 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2017-01-18 16:08:25 +0000 |
commit | f34508a3a6aaba2c4acf31e5590245624a8beb4a (patch) | |
tree | b39e96c5915ec8f3e11d58e8300016b7c46a241d | |
parent | 4e1d2a8fd1a5f18675063cb04be270053dd8b033 (diff) | |
download | file-git-f34508a3a6aaba2c4acf31e5590245624a8beb4a.tar.gz |
PR/586: Add missing section headers info message.
-rw-r--r-- | src/readelf.c | 7 |
1 files 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; |