1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/nkf/nkf.c (rb_nkf_convert, rb_nkf_guess): check too huge

string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-05-21 10:11:44 +00:00
parent 96018aca66
commit 042d12d884
3 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Fri May 21 19:11:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/nkf/nkf.c (rb_nkf_convert, rb_nkf_guess): check too huge
string.
Thu May 20 22:19:37 2010 Yusuke Endoh <mame@tsg.ne.jp>
* vm_eval.c (rb_f_caller): update rdoc. a patch from Nobuhiro IMAI

View file

@ -155,12 +155,12 @@ rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
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 @@ rb_nkf_guess(VALUE obj, VALUE src)
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 );

View file

@ -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"