diff options
| author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-16 03:17:16 +0000 |
|---|---|---|
| committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-16 03:17:16 +0000 |
| commit | 8a8a10ec5690f9b0b43281031bdf55a461730690 (patch) | |
| tree | e3bc91fbb331b6c2c1e07fbbbab626dd1e3b665c | |
| parent | 2d5aba75604f45fe78a2910f55201caf6701b0b1 (diff) | |
| download | ruby-8a8a10ec5690f9b0b43281031bdf55a461730690.tar.gz ruby-8a8a10ec5690f9b0b43281031bdf55a461730690.tar.xz ruby-8a8a10ec5690f9b0b43281031bdf55a461730690.zip | |
* ext/syck/rubyext.c (syck_scalar_value_set): should set newly
allocated memory instead of RString's internal storage.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | ext/syck/rubyext.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -5,6 +5,8 @@ Fri Dec 16 11:44:43 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> * ext/syck/rubyext.c (syck_node_type_id_set): should set newly allocated memory instead of RString's internal storage. + * ext/syck/rubyext.c (syck_scalar_value_set): ditto. + ... these fixes won't fix [ruby-dev:27839]. more work is needed. Thu Dec 15 12:35:14 2005 Yukihiro Matsumoto <matz@ruby-lang.org> diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index e45d4971f..22cbbaf55 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -1522,7 +1522,7 @@ syck_scalar_value_set( self, val ) Data_Get_Struct( self, SyckNode, node ); StringValue( val ); - node->data.str->ptr = RSTRING(val)->ptr; + node->data.str->ptr = syck_strndup( RSTRING(val)->ptr, RSTRING(val)->len ); node->data.str->len = RSTRING(val)->len; node->data.str->style = scalar_none; |
