diff options
Diffstat (limited to 'usr.bin/tail/reverse.c')
-rw-r--r-- | usr.bin/tail/reverse.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/tail/reverse.c b/usr.bin/tail/reverse.c index 34cd980..4557064 100644 --- a/usr.bin/tail/reverse.c +++ b/usr.bin/tail/reverse.c @@ -200,6 +200,11 @@ r_buf(fp) len < BSZ && (ch = getc(fp)) != EOF; ++len) *p++ = ch; + if (ferror(fp)) { + ierr(); + return; + } + /* * If no input data for this block and we tossed some data, * recover it. |