summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-30 08:35:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-30 08:35:23 +0000
commit1852b4a8660ee8e71997f81cee4903c6eb23f306 (patch)
tree651e33765db8a4d18ab102ea1ef38fc6f5deafc2 /ext/readline
parentd00c9d7e0609f6d9b6141e1dde6fa9321de70b85 (diff)
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/readline')
-rw-r--r--ext/readline/readline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 253798f..5b52422 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -92,7 +92,8 @@ static char **readline_attempted_completion_function(const char *text,
int start, int end);
#define OutputStringValue(str) do {\
- SafeStringValue(str);\
+ StringValueCStr(str);\
+ rb_check_safe_obj(str);\
(str) = rb_str_conv_enc((str), rb_enc_get(str), rb_locale_encoding());\
} while (0)\