diff options
author | kevlo <kevlo@FreeBSD.org> | 2016-02-14 14:23:56 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2016-02-14 14:23:56 +0000 |
commit | d4f3e58ebfa3109da83658aa07dfb663ed4b6a72 (patch) | |
tree | 99308e0346c3f4fd9335b942bb9e2be611208f8c /usr.bin | |
parent | bc9b18cea2385ac27eaffb6d0bcc79725b4949e8 (diff) | |
download | FreeBSD-src-d4f3e58ebfa3109da83658aa07dfb663ed4b6a72.zip FreeBSD-src-d4f3e58ebfa3109da83658aa07dfb663ed4b6a72.tar.gz |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/hexdump/display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index 4ff3308..36230aa 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -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; |