mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* 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
This commit is contained in:
parent
3279020e87
commit
bf0c93851a
3 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 5 22:02:27 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_splice): integer overflow for length.
|
||||
[ruby-dev:31739]
|
||||
|
||||
Sun Sep 2 00:48:15 2007 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* lib/date/format.rb (_parse): improved parsing of ordinal dates.
|
||||
|
|
2
string.c
2
string.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.8.6"
|
||||
#define RUBY_RELEASE_DATE "2007-09-01"
|
||||
#define RUBY_RELEASE_DATE "2007-09-05"
|
||||
#define RUBY_VERSION_CODE 186
|
||||
#define RUBY_RELEASE_CODE 20070901
|
||||
#define RUBY_RELEASE_CODE 20070905
|
||||
#define RUBY_PATCHLEVEL 5000
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 6
|
||||
#define RUBY_RELEASE_YEAR 2007
|
||||
#define RUBY_RELEASE_MONTH 9
|
||||
#define RUBY_RELEASE_DAY 1
|
||||
#define RUBY_RELEASE_DAY 5
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue