From 2b4a6aac20e64ae801962d8b3411d63b3e94beef Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Tue, 9 Dec 2014 02:47:07 +0000 Subject: [PATCH] and non-zero sizes. --- src/readelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/readelf.c b/src/readelf.c index 6a8a07e6..53d0aa96 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.108 2014/11/27 15:16:00 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.109 2014/12/09 02:46:38 christos Exp $") #endif #ifdef BUILTIN_ELF @@ -1285,7 +1285,7 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf, file_badread(ms); return -1; } - if (S_ISREG(st.st_mode)) + if (S_ISREG(st.st_mode) || fsize != 0) fsize = st.st_size; else fsize = SIZE_UNKNOWN; -- 2.40.0