diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-02 03:51:50 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-02 03:51:50 +0000 |
commit | 58e68a3660c47739d7a70cc6f5cdebec030502d2 (patch) | |
tree | e66bc7e98dd9a64d633af4220bcae7e63994e1b8 /string.c | |
parent | 58dd5de9664c57d72b45fd90a75f08fab506f208 (diff) |
2000-03-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -265,6 +265,9 @@ rb_str_times(str, times) if (len < 0) { rb_raise(rb_eArgError, "negative argument"); } + if (LONG_MAX / len < RSTRING(str)->len) { + rb_raise(rb_eArgError, "argument too big"); + } str2 = rb_str_new(0, RSTRING(str)->len*len); for (i=0; i<len; i++) { |