[前][次][番号順一覧][スレッド一覧]

ruby-changes:43745

From: usa <ko1@a...>
Date: Fri, 5 Aug 2016 23:19:32 +0900 (JST)
Subject: [ruby-changes:43745] usa:r55818 (trunk): * hasn.c (env_str_new): taint the string. get rid of a test failure

usa	2016-08-05 23:19:26 +0900 (Fri, 05 Aug 2016)

  New Revision: 55818

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55818

  Log:
    * hasn.c (env_str_new): taint the string.  get rid of a test failure
      introduced at r55811.

  Modified files:
    trunk/ChangeLog
    trunk/hash.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55817)
+++ ChangeLog	(revision 55818)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Aug  5 23:18:35 2016  NAKAMURA Usaku  <usa@r...>
+
+	* hasn.c (env_str_new): taint the string.  get rid of a test failure
+	  introduced at r55811.
+
 Fri Aug  5 17:04:02 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* hash.c (w32_getenv): call rb_w32_getenv and rb_w32_ugetenv via
Index: hash.c
===================================================================
--- hash.c	(revision 55817)
+++ hash.c	(revision 55818)
@@ -2944,6 +2944,7 @@ env_str_new(const char *ptr, long len) https://github.com/ruby/ruby/blob/trunk/hash.c#L2944
 {
 #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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]