ruby-changes:1882
From: ko1@a...
Date: 7 Sep 2007 14:38:26 +0900
Subject: [ruby-changes:1882] shyouhei - Ruby:r13373 (ruby_1_8_5): * array.c (rb_ary_fill): need integer overflow check.
shyouhei 2007-09-07 14:38:18 +0900 (Fri, 07 Sep 2007)
New Revision: 13373
Modified files:
branches/ruby_1_8_5/ChangeLog
branches/ruby_1_8_5/array.c
branches/ruby_1_8_5/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_5/version.h?r1=13373&r2=13372
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/array.c?r1=13373&r2=13372
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ChangeLog?r1=13373&r2=13372
Index: ruby_1_8_5/array.c
===================================================================
--- ruby_1_8_5/array.c (revision 13372)
+++ ruby_1_8_5/array.c (revision 13373)
@@ -2258,6 +2258,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_5/ChangeLog
===================================================================
--- ruby_1_8_5/ChangeLog (revision 13372)
+++ ruby_1_8_5/ChangeLog (revision 13373)
@@ -1,5 +1,8 @@
Fri Sep 7 14:32:38 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_5/version.h
===================================================================
--- ruby_1_8_5/version.h (revision 13372)
+++ ruby_1_8_5/version.h (revision 13373)
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-09-07"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070907
-#define RUBY_PATCHLEVEL 106
+#define RUBY_PATCHLEVEL 107
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml