From d2403667fd954c7f331d1453d1330fa5bb997bbe Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 19 Nov 2001 14:42:45 +0000 Subject: * eval.c (rb_mod_modfunc): should follow NODE_ZSUPER link; based on Guy Decoux's patch in [ruby-talk:25478]. * string.c (rb_str_succ): there was buffer overrun. * parse.y (str_extend): term can be any character. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 1c45632b7..1e55148f4 100644 --- a/string.c +++ b/string.c @@ -1018,7 +1018,7 @@ rb_str_succ(orig) } } if (s < sbeg) { - REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len + 1); + REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len + 2); s = RSTRING(str)->ptr + n; memmove(s+1, s, RSTRING(str)->len - n); *s = c; -- cgit