diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index a5f2a4799e7a..4ff33080780b 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -380,7 +380,7 @@ doskip(const char *fname, int statok) return; } } - if (S_ISREG(sb.st_mode)) { + if (statok && S_ISREG(sb.st_mode)) { if (fseeko(stdin, skip, SEEK_SET)) err(1, "%s", fname); address += skip;