Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2016 14:23:57 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295610 - head/usr.bin/hexdump
Message-ID:  <201602141423.u1EENv1J064758@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Sun Feb 14 14:23:56 2016
New Revision: 295610
URL: https://svnweb.freebsd.org/changeset/base/295610

Log:
  Fix a bug that caused nothing to be skipped when skipping exactly the
  number of bytes present in a regular file was requested.
  
  Obtained from:	OpenBSD

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

Modified: head/usr.bin/hexdump/display.c
==============================================================================
--- head/usr.bin/hexdump/display.c	Sun Feb 14 13:42:16 2016	(r295609)
+++ head/usr.bin/hexdump/display.c	Sun Feb 14 14:23:56 2016	(r295610)
@@ -374,7 +374,7 @@ doskip(const char *fname, int statok)
 	if (statok) {
 		if (fstat(fileno(stdin), &sb))
 			err(1, "%s", fname);
-		if (S_ISREG(sb.st_mode) && skip >= sb.st_size) {
+		if (S_ISREG(sb.st_mode) && skip > sb.st_size) {
 			address += sb.st_size;
 			skip -= sb.st_size;
 			return;



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