diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | array.c | 3 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,8 @@ Fri Sep 7 16:39:23 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + * array.c (rb_ary_fill): need integer overflow check. + [ruby-dev:31738] + * string.c (rb_str_splice): integer overflow for length. [ruby-dev:31739] @@ -2266,6 +2266,9 @@ rb_ary_fill(argc, argv, ary) } 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); @@ -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 |