diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-07 07:40:27 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-07 07:40:27 +0000 |
commit | 80c37b72cf6f57718227076366a651bbc1f73960 (patch) | |
tree | 45715edfe9857b089360108d586c83c292856a29 /string.c | |
parent | 05f10eba96d36c10c38e9cee0697a0c105044010 (diff) |
* string.c (rb_str_splice): integer overflow for length.
[ruby-dev:31739]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1647,7 +1647,7 @@ rb_str_splice(str, beg, len, val) } beg += RSTRING(str)->len; } - if (RSTRING(str)->len < beg + len) { + if (RSTRING(str)->len < len || RSTRING(str)->len < beg + len) { len = RSTRING(str)->len - beg; } |