diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-27 14:15:43 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-27 14:15:43 +0000 |
commit | 94e6598969b76d613188ae9015e5d02f31c622a0 (patch) | |
tree | c6c4a3805f569d2688067ec37117b2d0332e7969 /ruby.c | |
parent | ba757763464cb3cd344454bb8d8e062ca92d2a3d (diff) |
merge revision(s) 64071: [Backport #14941]
ruby.c: taint ARGV on Windows
* ruby.c (external_str_new_cstr): strings come from the external
should be tainted. [ruby-dev:50596] [Bug #14941]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@64563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2069,7 +2069,9 @@ external_str_new_cstr(const char *p) { #if UTF8_PATH VALUE str = rb_utf8_str_new_cstr(p); - return str_conv_enc(str, NULL, rb_default_external_encoding()); + str = str_conv_enc(str, NULL, rb_default_external_encoding()); + OBJ_TAINT_RAW(str); + return str; #else return rb_external_str_new_cstr(p); #endif |