From 715c2de68f06da7372d7a8d85cd8d59eb56e0ac9 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 23 Jun 2003 06:52:39 +0000 Subject: * string.c (rb_str_upto): generate sequence according to "succ" order. formerly check was done by dictionary order. [ruby-talk:74138] * string.c (rb_string_value): fill constant empty string along with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] * string.c (rb_string_value_ptr): ditto. * string.c (rb_check_string_type): ditto. * string.c (str_gsub): move END(0) check before mbclen2(). * string.c (scan_once): reduce END(0) check. * io.c (rb_io_initialize): accept fixnum mode. * eval.c (error_print): replace strchr() by memchr(), einfo may contain "\0". * pack.c (pack_unpack): range check for "@" move; initialize check for "m". * error.c (syserr_initialize): avoid buffer overflow. * file.c (rb_file_s_readlink): expand buffer until readlink succeed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index 156b329f8..ad1413873 100644 --- a/file.c +++ b/file.c @@ -1275,7 +1275,7 @@ rb_file_s_readlink(klass, path) SafeStringValue(path); buf = xmalloc(size); - if ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size) { + while ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size) { size *= 2; buf = xrealloc(buf, size); } -- cgit