summaryrefslogtreecommitdiffstats
path: root/ext/syck
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-16 03:17:16 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-16 03:17:16 +0000
commit8a8a10ec5690f9b0b43281031bdf55a461730690 (patch)
treee3bc91fbb331b6c2c1e07fbbbab626dd1e3b665c /ext/syck
parent2d5aba75604f45fe78a2910f55201caf6701b0b1 (diff)
downloadruby-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.c2
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;