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/trunk@16399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
20f4f5f82c
commit
5f0e8f582b
3 changed files with 9 additions and 4 deletions
|
@ -4,6 +4,11 @@ Tue May 13 08:25:31 2008 Tanaka Akira <akr@fsij.org>
|
|||
(rb_f_readline): ditto.
|
||||
(rb_f_readlines): ditto.
|
||||
|
||||
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 23:37:57 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* vm.c (collect_local_variables_in_env): remove unnecessary check
|
||||
|
|
2
string.c
2
string.c
|
@ -1448,7 +1448,7 @@ rb_str_cat(VALUE str, const char *ptr, long len)
|
|||
if (STR_ASSOC_P(str)) {
|
||||
rb_str_modify(str);
|
||||
if (STR_EMBED_P(str)) str_make_independent(str);
|
||||
REALLOC_N(RSTRING(str)->as.heap.ptr, char, RSTRING(str)->as.heap.len+len);
|
||||
REALLOC_N(RSTRING(str)->as.heap.ptr, char, RSTRING(str)->as.heap.len+len+1);
|
||||
memcpy(RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len, ptr, len);
|
||||
RSTRING(str)->as.heap.len += len;
|
||||
RSTRING(str)->as.heap.ptr[RSTRING(str)->as.heap.len] = '\0'; /* sentinel */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2008-05-12"
|
||||
#define RUBY_RELEASE_DATE "2008-05-13"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20080512
|
||||
#define RUBY_RELEASE_CODE 20080513
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#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[];
|
||||
|
|
Loading…
Add table
Reference in a new issue