Skip to content

Commit 6bcf74c

Browse files
committed
* 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_5@13371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 2a7539a commit 6bcf74c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Fri Sep 7 14:32:38 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
2+
3+
* string.c (rb_str_splice): integer overflow for length.
4+
[ruby-dev:31739]
5+
16
Fri Sep 7 14:27:33 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
27

38
* eval.c (mnew): should preserve noex as safe_level.

string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ rb_str_splice(str, beg, len, val)
16441644
}
16451645
beg += RSTRING(str)->len;
16461646
}
1647-
if (RSTRING(str)->len < beg + len) {
1647+
if (RSTRING(str)->len < len || RSTRING(str)->len < beg + len) {
16481648
len = RSTRING(str)->len - beg;
16491649
}
16501650

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2007-09-07"
33
#define RUBY_VERSION_CODE 185
44
#define RUBY_RELEASE_CODE 20070907
5-
#define RUBY_PATCHLEVEL 105
5+
#define RUBY_PATCHLEVEL 106
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)