ruby-changes:1853
From: ko1@a...
Date: 5 Sep 2007 22:28:01 +0900
Subject: [ruby-changes:1853] matz - Ruby:r13344 (ruby_1_8): * array.c (rb_ary_fill): need integer overflow check.
matz 2007-09-05 22:27:52 +0900 (Wed, 05 Sep 2007) New Revision: 13344 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/array.c Log: * array.c (rb_ary_fill): need integer overflow check. [ruby-dev:31738] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=13344&r2=13343 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/array.c?r1=13344&r2=13343 Index: ruby_1_8/array.c =================================================================== --- ruby_1_8/array.c (revision 13343) +++ ruby_1_8/array.c (revision 13344) @@ -2264,6 +2264,9 @@ } rb_ary_modify(ary); end = beg + len; + if (end < 0) { + rb_raise(rb_eArgError, "argument too big"); + } if (end > RARRAY(ary)->len) { if (end >= RARRAY(ary)->aux.capa) { REALLOC_N(RARRAY(ary)->ptr, VALUE, end); Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 13343) +++ ruby_1_8/ChangeLog (revision 13344) @@ -1,5 +1,8 @@ Wed Sep 5 22:02:27 2007 Yukihiro Matsumoto <matz@r...> + * array.c (rb_ary_fill): need integer overflow check. + [ruby-dev:31738] + * string.c (rb_str_splice): integer overflow for length. [ruby-dev:31739] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml