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 | 87ea59c208fc792b54049caf2b6029cc79244b73 (patch) | |
tree | e3bc91fbb331b6c2c1e07fbbbab626dd1e3b665c /ext/syck/rubyext.c | |
parent | f4f242b6d2ca28a6ec44510b21f1e7df906dc79c (diff) |
* ext/syck/rubyext.c (syck_scalar_value_set): should set newly
allocated memory instead of RString's internal storage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck/rubyext.c')
-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 e45d4971f2..22cbbaf55a 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; |