svn commit: r282041 - head/usr.bin/hexdump

Jilles Tjoelker jilles at FreeBSD.org
Sun Apr 26 21:34:56 UTC 2015


Author: jilles
Date: Sun Apr 26 21:34:55 2015
New Revision: 282041
URL: https://svnweb.freebsd.org/changeset/base/282041

Log:
  hexdump: Don't use uninitialized struct stat.

Modified:
  head/usr.bin/hexdump/display.c

Modified: head/usr.bin/hexdump/display.c
==============================================================================
--- head/usr.bin/hexdump/display.c	Sun Apr 26 21:32:45 2015	(r282040)
+++ head/usr.bin/hexdump/display.c	Sun Apr 26 21:34:55 2015	(r282041)
@@ -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;


More information about the svn-src-all mailing list