svn commit: r295610 - head/usr.bin/hexdump
Kevin Lo
kevlo at FreeBSD.org
Sun Feb 14 14:23:58 UTC 2016
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;
More information about the svn-src-all
mailing list