From c3210060864218b6d5b26cfcfb50eab1badac1cb Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 26 Apr 2015 21:34:55 +0000 Subject: [PATCH] hexdump: Don't use uninitialized struct stat. --- usr.bin/hexdump/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index a5f2a4799e7..4ff33080780 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;