Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 2015 21:26:08 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r282738 - stable/10/usr.bin/hexdump
Message-ID:  <201505102126.t4ALQ84W077371@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505102126.t4ALQ84W077371>