diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-30 08:35:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-30 08:35:23 +0000 |
commit | 1852b4a8660ee8e71997f81cee4903c6eb23f306 (patch) | |
tree | 651e33765db8a4d18ab102ea1ef38fc6f5deafc2 /ext/psych/psych_emitter.c | |
parent | d00c9d7e0609f6d9b6141e1dde6fa9321de70b85 (diff) | |
download | ruby-1852b4a8660ee8e71997f81cee4903c6eb23f306.tar.gz |
ext: check if null byte is contained
[ruby-dev:50267] [Bug #13953]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/psych_emitter.c')
-rw-r--r-- | ext/psych/psych_emitter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/psych_emitter.c b/ext/psych/psych_emitter.c index 2154470781..bb4c4b226b 100644 --- a/ext/psych/psych_emitter.c +++ b/ext/psych/psych_emitter.c @@ -192,8 +192,8 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp) name = rb_str_export_to_enc(name, encoding); value = rb_str_export_to_enc(value, encoding); - tail->handle = (yaml_char_t *)RSTRING_PTR(name); - tail->prefix = (yaml_char_t *)RSTRING_PTR(value); + tail->handle = (yaml_char_t *)StringValueCStr(name); + tail->prefix = (yaml_char_t *)StringValueCStr(value); tail++; } |