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

ruby-changes:12581

From: yugui <ko1@a...>
Date: Mon, 27 Jul 2009 00:32:49 +0900 (JST)
Subject: [ruby-changes:12581] Ruby:r24290 (ruby_1_9_1): merges r24203 from trunk into ruby_1_9_1.

yugui	2009-07-27 00:32:28 +0900 (Mon, 27 Jul 2009)

  New Revision: 24290

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24290

  Log:
    merges r24203 from trunk into ruby_1_9_1.
    --
    * io.c (io_read): should taint the result.   [ruby-dev:38826]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/io.c
    branches/ruby_1_9_1/test/ruby/test_io.rb
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 24289)
+++ ruby_1_9_1/ChangeLog	(revision 24290)
@@ -1,3 +1,7 @@
+Sun Jul 19 17:32:37 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (io_read): should taint the result.   [ruby-dev:38826]
+
 Sat Jul 18 23:44:59 2009  NARUSE, Yui  <naruse@r...>
 
 	* re.c (reg_enc_error): use rb_enc_get to get the encoding of
Index: ruby_1_9_1/io.c
===================================================================
--- ruby_1_9_1/io.c	(revision 24289)
+++ ruby_1_9_1/io.c	(revision 24290)
@@ -1998,6 +1998,7 @@
         return Qnil;
     }
     rb_str_resize(str, n);
+    OBJ_TAINT(str);
 
     return str;
 }
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 24289)
+++ ruby_1_9_1/version.h	(revision 24290)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 247
+#define RUBY_PATCHLEVEL 248
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_1/test/ruby/test_io.rb
===================================================================
--- ruby_1_9_1/test/ruby/test_io.rb	(revision 24289)
+++ ruby_1_9_1/test/ruby/test_io.rb	(revision 24290)
@@ -1368,4 +1368,10 @@
       }
     }
   end
+
+  def test_tainted
+    t = make_tempfile
+    assert(File.read(t.path, 4).tainted?, '[ruby-dev:38826]')
+    assert(File.open(t.path) {|f| f.read(4)}.tainted?, '[ruby-dev:38826]')
+  end
 end

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

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