diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-01 04:19:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-01 04:19:47 +0000 |
commit | 365f1cd57e4d8d9416c28bf61cd984e796ece646 (patch) | |
tree | 33e3c052c05b570bac7c917261c92951eda96bdf /array.c | |
parent | eb33f91cb7a763331e210bc10fbdefa037366496 (diff) | |
download | ruby-365f1cd57e4d8d9416c28bf61cd984e796ece646.tar.gz |
* array.c (rb_ary_fill): check if beg is too big.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2145,7 +2145,7 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary) break; } rb_ary_modify(ary); - if (len > ARY_MAX_SIZE - beg) { + if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) { rb_raise(rb_eArgError, "argument too big"); } end = beg + len; |