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 /ext/syck | |
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
Diffstat (limited to 'ext/syck')
-rw-r--r-- | ext/syck/rubyext.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |