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

ruby-changes:42594

From: hsbt <ko1@a...>
Date: Fri, 22 Apr 2016 09:46:56 +0900 (JST)
Subject: [ruby-changes:42594] hsbt:r54668 (trunk): * file.c, win32/file.c: Removed obsoleted safe level checks.

hsbt	2016-04-22 10:43:31 +0900 (Fri, 22 Apr 2016)

  New Revision: 54668

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

  Log:
    * file.c, win32/file.c: Removed obsoleted safe level checks.
      [fix GH-1327] Patch by @cremno

  Modified files:
    trunk/ChangeLog
    trunk/file.c
    trunk/win32/file.c
Index: win32/file.c
===================================================================
--- win32/file.c	(revision 54667)
+++ win32/file.c	(revision 54668)
@@ -27,7 +27,7 @@ static struct code_page_table { https://github.com/ruby/ruby/blob/trunk/win32/file.c#L27
 #define INVALID_CODE_PAGE 51932
 #define PATH_BUFFER_SIZE MAX_PATH * 2
 
-#define insecure_obj_p(obj, level) ((level) >= 4 || ((level) > 0 && OBJ_TAINTED(obj)))
+#define insecure_obj_p(obj, level) ((level) > 0 && OBJ_TAINTED(obj))
 
 /* defined in win32/win32.c */
 #define system_code_page rb_w32_filecp
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54667)
+++ ChangeLog	(revision 54668)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 22 10:43:19 2016  SHIBATA Hiroshi  <hsbt@r...>
+
+	* file.c, win32/file.c: Removed obsoleted safe level checks.
+	  [fix GH-1327] Patch by @cremno
+
 Fri Apr 22 10:01:48 2016  SHIBATA Hiroshi  <hsbt@r...>
 
 	* benchmark/bm_so_meteor_contest.rb: fix a typo.
Index: file.c
===================================================================
--- file.c	(revision 54667)
+++ file.c	(revision 54668)
@@ -124,7 +124,7 @@ VALUE rb_cFile; https://github.com/ruby/ruby/blob/trunk/file.c#L124
 VALUE rb_mFileTest;
 VALUE rb_cStat;
 
-#define insecure_obj_p(obj, level) ((level) >= 4 || ((level) > 0 && OBJ_TAINTED(obj)))
+#define insecure_obj_p(obj, level) ((level) > 0 && OBJ_TAINTED(obj))
 
 static VALUE
 file_path_convert(VALUE name)

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

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