diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-05 13:18:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-05 13:18:23 +0000 |
commit | bf0c93851a4345ed2986387bda5d72ca3afb4a75 (patch) | |
tree | 0815a59dcca8cb186c04c98ce7b09836e7c62b91 /string.c | |
parent | 3279020e87495064b13616e44abdb90405deff8e (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@13343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1652,7 +1652,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; } |