projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
876ff10
)
(tail_bytes): Change type of bytes_remaining to off_t
author
Jim Meyering
<jim@meyering.net>
Sat, 28 Sep 2002 09:21:17 +0000
(09:21 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sat, 28 Sep 2002 09:21:17 +0000
(09:21 +0000)
to avoid overflow. Reported by Hans Lermen.
src/tail.c
patch
|
blob
|
history
diff --git
a/src/tail.c
b/src/tail.c
index
d9b1b2c
..
0d5ea58
100644
(file)
--- 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)