print empty if we could not read the interpreter.
authorChristos Zoulas <christos@zoulas.com>
Thu, 11 Dec 2014 14:10:53 +0000 (14:10 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 11 Dec 2014 14:10:53 +0000 (14:10 +0000)
src/readelf.c

index 932e6eb2a22b969530ca3b689fdfe92dc3c4ad50..78ed2a7965e65c8f5362ba44c7630f9c1e2593ad 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.112 2014/12/11 12:34:24 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.113 2014/12/11 14:10:53 christos Exp $")
 #endif
 
 #ifdef BUILTIN_ELF
@@ -1227,7 +1227,8 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
                        if (bufsize) {
                                nbuf[bufsize - 1] = '\0';
                                interp = (const char *)nbuf;
-                       }
+                       } else
+                               interp = "*empty*";
                        break;
                case PT_NOTE:
                        /*