ruby-changes:16611
From: yugui <ko1@a...>
Date: Sat, 10 Jul 2010 13:06:30 +0900 (JST)
Subject: [ruby-changes:16611] Ruby:r28605 (ruby_1_9_2): merges r28577 from trunk into ruby_1_9_2.
yugui 2010-07-10 13:06:12 +0900 (Sat, 10 Jul 2010) New Revision: 28605 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28605 Log: merges r28577 from trunk into ruby_1_9_2. -- * string.c (rb_str_conv_enc_opts): fix infinite loop because of ISO-2022-JP conversion with empty string. patched by Brian Buchanan [ruby-core:31107] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/string.c Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 28604) +++ ruby_1_9_2/ChangeLog (revision 28605) @@ -1,3 +1,9 @@ +Thu Jul 8 15:47:34 2010 NARUSE, Yui <naruse@r...> + + * string.c (rb_str_conv_enc_opts): fix infinite loop because + of ISO-2022-JP conversion with empty string. + patched by Brian Buchanan [ruby-core:31107] + Wed Jul 7 10:26:20 2010 NARUSE, Yui <naruse@r...> * missing/close.c: ignore ECONNRESET. Index: ruby_1_9_2/string.c =================================================================== --- ruby_1_9_2/string.c (revision 28604) +++ ruby_1_9_2/string.c (revision 28605) @@ -513,7 +513,7 @@ switch (ret) { case econv_destination_buffer_full: /* destination buffer short */ - len *= 2; + len = len < 2 ? 2 : len * 2; rb_str_resize(newstr, len); goto retry; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/