aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/hexdump
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2015-04-26 21:34:55 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2015-04-26 21:34:55 +0000
commitc3210060864218b6d5b26cfcfb50eab1badac1cb (patch)
treea2b0d6dfd55b3654f0314d9cdc706bcd934027bb /usr.bin/hexdump
parenta5e0fa4063cf3b42e8392376c3ba09b528f570a8 (diff)
downloadsrc-c3210060864218b6d5b26cfcfb50eab1badac1cb.tar.gz
src-c3210060864218b6d5b26cfcfb50eab1badac1cb.zip
hexdump: Don't use uninitialized struct stat.
Notes
Notes: svn path=/head/; revision=282041
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r--usr.bin/hexdump/display.c2
1 files changed, 1 insertions, 1 deletions
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;