From 87e110e2c2f7d0977f0c514f6cf35b468d70a80b Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 11 Dec 2014 14:19:36 +0000 Subject: [PATCH] handle more empty interpreters. --- src/readelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/readelf.c b/src/readelf.c index 78ed2a79..b17667f9 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.113 2014/12/11 14:10:53 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.114 2014/12/11 14:19:36 christos Exp $") #endif #ifdef BUILTIN_ELF @@ -1224,7 +1224,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, /* Things we can determine when we seek */ switch (xph_type) { case PT_INTERP: - if (bufsize) { + if (bufsize && nbuf[0]) { nbuf[bufsize - 1] = '\0'; interp = (const char *)nbuf; } else -- 2.40.0