summaryrefslogtreecommitdiffstats
path: root/contrib/file/src/magic.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2016-12-11 07:33:02 +0000
committerdelphij <delphij@FreeBSD.org>2016-12-11 07:33:02 +0000
commit6deb05a98d247385fa8f1b418199fc619cf40a8f (patch)
tree7388da32748fcb12b1e5a9251297ca9dc18ac284 /contrib/file/src/magic.c
parent5e2d8ce3d45ee17a1f4045573bd1b42e6341bfcb (diff)
downloadFreeBSD-src-6deb05a98d247385fa8f1b418199fc619cf40a8f.zip
FreeBSD-src-6deb05a98d247385fa8f1b418199fc619cf40a8f.tar.gz
MFC r308420: MFV r308392: file 5.29.
Diffstat (limited to 'contrib/file/src/magic.c')
-rw-r--r--contrib/file/src/magic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/file/src/magic.c b/contrib/file/src/magic.c
index a256c42..b61ad29 100644
--- a/contrib/file/src/magic.c
+++ b/contrib/file/src/magic.c
@@ -33,7 +33,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.99 2016/05/03 16:09:38 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.100 2016/07/18 11:43:05 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -492,7 +492,7 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd)
if (r < PIPE_BUF) break;
}
- if (nbytes == 0) {
+ if (nbytes == 0 && inname) {
/* We can not read it, but we were able to stat it. */
if (unreadable_info(ms, sb.st_mode, inname) == -1)
goto done;
OpenPOWER on IntegriCloud