summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-02 18:05:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-02 18:05:02 +0000
commit2c225e77e0521f91477b0f470df0a788a199d3c1 (patch)
treeb83875aaf9f38c8c8df880308ea00338dae17c64 /io.c
parent086830cbac0972291297fa4a094919ebeace8659 (diff)
* numeric.c (flo_to_s): get rid of buffer overflow.
* io.c (appendline): clearerr(3) before raising exception, since exception may be captured by rescue. [ruby-talk:77794] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 1256663f13..eadaae48e2 100644
--- a/io.c
+++ b/io.c
@@ -908,9 +908,9 @@ appendline(fptr, delim, strp)
TRAP_END;
if (c == EOF) {
if (ferror(f)) {
+ clearerr(f);
if (!rb_io_wait_readable(fileno(f)))
rb_sys_fail(fptr->path);
- clearerr(f);
continue;
}
return c;