ruby-changes:16000
From: nobu <ko1@a...>
Date: Fri, 21 May 2010 19:12:06 +0900 (JST)
Subject: [ruby-changes:16000] Ruby:r27947 (trunk, ruby_1_9_2): * ext/nkf/nkf.c (rb_nkf_convert, rb_nkf_guess): check too huge
nobu 2010-05-21 19:11:44 +0900 (Fri, 21 May 2010) New Revision: 27947 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27947 Log: * ext/nkf/nkf.c (rb_nkf_convert, rb_nkf_guess): check too huge string. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/ext/nkf/nkf.c branches/ruby_1_9_2/version.h trunk/ChangeLog trunk/ext/nkf/nkf.c Index: ChangeLog =================================================================== --- ChangeLog (revision 27946) +++ ChangeLog (revision 27947) @@ -1,3 +1,8 @@ +Fri May 21 19:11:42 2010 Nobuyoshi Nakada <nobu@r...> + + * ext/nkf/nkf.c (rb_nkf_convert, rb_nkf_guess): check too huge + string. + Fri May 21 18:12:12 2010 Nobuyoshi Nakada <nobu@r...> * include/ruby/ruby.h (rb_intern): C90 needs nonempty macro Index: ext/nkf/nkf.c =================================================================== --- ext/nkf/nkf.c (revision 27946) +++ ext/nkf/nkf.c (revision 27947) @@ -155,12 +155,12 @@ input_ctr = 0; StringValue(src); input = (unsigned char *)RSTRING_PTR(src); - i_len = RSTRING_LEN(src); + i_len = RSTRING_LENINT(src); tmp = result = rb_str_new(0, i_len*3 + 10); output_ctr = 0; output = (unsigned char *)RSTRING_PTR(result); - o_len = RSTRING_LEN(result); + o_len = RSTRING_LENINT(result); *output = '\0'; kanji_convert(NULL); @@ -192,7 +192,7 @@ input_ctr = 0; StringValue(src); input = (unsigned char *)RSTRING_PTR(src); - i_len = RSTRING_LEN(src); + i_len = RSTRING_LENINT(src); guess_f = TRUE; kanji_convert( NULL ); Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 27946) +++ ruby_1_9_2/ChangeLog (revision 27947) @@ -1,3 +1,8 @@ +Fri May 21 19:11:42 2010 Nobuyoshi Nakada <nobu@r...> + + * ext/nkf/nkf.c (rb_nkf_convert, rb_nkf_guess): check too huge + string. + Thu May 20 22:19:37 2010 Yusuke Endoh <mame@t...> * vm_eval.c (rb_f_caller): update rdoc. a patch from Nobuhiro IMAI Index: ruby_1_9_2/ext/nkf/nkf.c =================================================================== --- ruby_1_9_2/ext/nkf/nkf.c (revision 27946) +++ ruby_1_9_2/ext/nkf/nkf.c (revision 27947) @@ -155,12 +155,12 @@ input_ctr = 0; StringValue(src); input = (unsigned char *)RSTRING_PTR(src); - i_len = RSTRING_LEN(src); + i_len = RSTRING_LENINT(src); tmp = result = rb_str_new(0, i_len*3 + 10); output_ctr = 0; output = (unsigned char *)RSTRING_PTR(result); - o_len = RSTRING_LEN(result); + o_len = RSTRING_LENINT(result); *output = '\0'; kanji_convert(NULL); @@ -192,7 +192,7 @@ input_ctr = 0; StringValue(src); input = (unsigned char *)RSTRING_PTR(src); - i_len = RSTRING_LEN(src); + i_len = RSTRING_LENINT(src); guess_f = TRUE; kanji_convert( NULL ); Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 27946) +++ ruby_1_9_2/version.h (revision 27947) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2010-05-20" +#define RUBY_RELEASE_DATE "2010-05-21" #define RUBY_PATCHLEVEL -1 #define RUBY_VERSION_MAJOR 1 @@ -7,7 +7,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 5 -#define RUBY_RELEASE_DAY 20 +#define RUBY_RELEASE_DAY 21 #include "ruby/version.h" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/