mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r24203 from trunk into ruby_1_9_1.
-- * io.c (io_read): should taint the result. [ruby-dev:38826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c02c2df727
commit
cd516cbbe0
4 changed files with 12 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
|||
Sun Jul 19 17:32:37 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (io_read): should taint the result. [ruby-dev:38826]
|
||||
|
||||
Sat Jul 18 23:44:59 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* re.c (reg_enc_error): use rb_enc_get to get the encoding of
|
||||
|
|
|
|||
1
io.c
1
io.c
|
|
@ -1998,6 +1998,7 @@ io_read(int argc, VALUE *argv, VALUE io)
|
|||
return Qnil;
|
||||
}
|
||||
rb_str_resize(str, n);
|
||||
OBJ_TAINT(str);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1368,4 +1368,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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue