summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 3af376255ea..1474460ea3f 100644
--- a/hash.c
+++ b/hash.c
@@ -2944,6 +2944,7 @@ env_str_new(const char *ptr, long len)
{
#ifdef _WIN32
VALUE str = env_str_transcode(rb_utf8_str_new(ptr, len), rb_locale_encoding());
+ OBJ_TAINT(str); /* rb_locale_str_new makes tainted string, but rb_utf8_str_new doesn't */
#else
VALUE str = rb_locale_str_new(ptr, len);
#endif