1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (rb_str_cat): fixed buffer overrun reported by

Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-05-13 01:19:41 +00:00
parent 9193324a10
commit 28693296b7
3 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Tue May 13 07:56:36 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_cat): fixed buffer overrun reported by
Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746]
Mon May 12 13:57:19 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}. "defined?(a||=1)"

View file

@ -761,7 +761,7 @@ rb_str_cat(str, ptr, len)
}
if (FL_TEST(str, STR_ASSOC)) {
rb_str_modify(str);
REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len+1);
memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING(str)->len += len;
RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.7"
#define RUBY_RELEASE_DATE "2008-05-12"
#define RUBY_RELEASE_DATE "2008-05-13"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20080512
#define RUBY_RELEASE_CODE 20080513
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 12
#define RUBY_RELEASE_DAY 13
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];