svn commit: r282738 - stable/10/usr.bin/hexdump

Jilles Tjoelker jilles at FreeBSD.org
Sun May 10 21:26:08 UTC 2015


Author: jilles
Date: Sun May 10 21:26:07 2015
New Revision: 282738
URL: https://svnweb.freebsd.org/changeset/base/282738

Log:
  MFC r282041: hexdump: Don't use uninitialized struct stat.
  
  PR:		196194

Modified:
  stable/10/usr.bin/hexdump/display.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/hexdump/display.c
==============================================================================
--- stable/10/usr.bin/hexdump/display.c	Sun May 10 21:24:55 2015	(r282737)
+++ stable/10/usr.bin/hexdump/display.c	Sun May 10 21:26:07 2015	(r282738)
@@ -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-stable mailing list