* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
646b699536
commit
3a6fd339d5
@ -1,3 +1,9 @@
|
|||||||
|
Thu Jul 8 15:47:34 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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]
|
||||||
|
|
||||||
Thu Jul 8 08:16:57 2010 Aaron Patterson <aaron@tenderlovemaking.com>
|
Thu Jul 8 08:16:57 2010 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||||
|
|
||||||
* ext/psych/lib/psych/visitors/yaml_tree.rb (push): adding version
|
* ext/psych/lib/psych/visitors/yaml_tree.rb (push): adding version
|
||||||
|
2
string.c
2
string.c
@ -513,7 +513,7 @@ rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags,
|
|||||||
switch (ret) {
|
switch (ret) {
|
||||||
case econv_destination_buffer_full:
|
case econv_destination_buffer_full:
|
||||||
/* destination buffer short */
|
/* destination buffer short */
|
||||||
len *= 2;
|
len = len < 2 ? 2 : len * 2;
|
||||||
rb_str_resize(newstr, len);
|
rb_str_resize(newstr, len);
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user