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 | f712a4f497075a1f7c759c5e83aa6e91465a08dc (patch) | |
tree | a7a5c7b4b027fdb8e0c61cf400bbcd69f3c125ce /array.c | |
parent | fe01219fcab58de6e527d7a876eb02017c6eac68 (diff) |
* array.c (rb_ary_fill): check if beg is too big.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2417,7 +2417,7 @@ rb_ary_fill(argc, argv, 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; |