summaryrefslogtreecommitdiff
path: root/src/tail.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-09-28 09:21:17 +0000
committerJim Meyering <jim@meyering.net>2002-09-28 09:21:17 +0000
commit475574011db63b2a80091e936d922198114184ab (patch)
treed2a7d17f12f65718ebccfe1510b50d13e44737a1 /src/tail.c
parent876ff10b0c66bcf167f2e250e495a33d8c71094f (diff)
downloadcoreutils-475574011db63b2a80091e936d922198114184ab.tar.xz
(tail_bytes): Change type of bytes_remaining to off_t
to avoid overflow. Reported by Hans Lermen.
Diffstat (limited to 'src/tail.c')
-rw-r--r--src/tail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c
index d9b1b2c74..0d5ea589b 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1070,7 +1070,7 @@ tail_bytes (const char *pretty_filename, int fd, off_t n_bytes)
if (S_ISREG (stats.st_mode))
{
off_t current_pos, end_pos;
- size_t bytes_remaining;
+ off_t bytes_remaining;
if ((current_pos = lseek (fd, (off_t) 0, SEEK_CUR)) != -1
&& (end_pos = lseek (fd, (off_t) 0, SEEK_END)) != -1)