From 2737b90e36f43865be74ebf6b71ea3ab42309720 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 19 Jul 2009 08:32:44 +0000 Subject: * io.c (io_read): should taint the result. [ruby-dev:38826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 42614e00cb..ab893dbfd8 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1457,4 +1457,10 @@ class TestIO < Test::Unit::TestCase } } 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 -- cgit v1.2.3