ruby-changes:1906
From: ko1@a...
Date: 7 Sep 2007 16:41:54 +0900
Subject: [ruby-changes:1906] shyouhei - Ruby:r13397 (ruby_1_8_6): * array.c (rb_ary_fill): need integer overflow check.
shyouhei 2007-09-07 16:41:46 +0900 (Fri, 07 Sep 2007)
New Revision: 13397
Modified files:
branches/ruby_1_8_6/ChangeLog
branches/ruby_1_8_6/array.c
branches/ruby_1_8_6/version.h
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_6/ChangeLog?r1=13397&r2=13396
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=13397&r2=13396
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/array.c?r1=13397&r2=13396
Index: ruby_1_8_6/array.c
===================================================================
--- ruby_1_8_6/array.c (revision 13396)
+++ ruby_1_8_6/array.c (revision 13397)
@@ -2266,6 +2266,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_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog (revision 13396)
+++ ruby_1_8_6/ChangeLog (revision 13397)
@@ -1,5 +1,8 @@
Fri Sep 7 16:39:23 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]
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h (revision 13396)
+++ ruby_1_8_6/version.h (revision 13397)
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-09-07"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070907
-#define RUBY_PATCHLEVEL 98
+#define RUBY_PATCHLEVEL 99
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml