diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-19 12:13:19 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-19 12:13:19 +0000 |
commit | 60e7104fd8978c9ea9feae021151bab9314485b6 (patch) | |
tree | 4e59af2489d55023bd17a31518972a5943912e78 /marshal.c | |
parent | a747366aec6a83103bda6572d06bc4979ffa3f49 (diff) |
merge revision(s) 38357,38363: [Backport #7325]
* marshal.c (r_entry0): don't taint classes and modules because
Marshal.load just return the dumped classes and modules.
[Bug #7325] [ruby-core:49198]
* test/ruby/test_marshal.rb: related test.
Marshal.load just returns the dumped classes and modules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@38468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1214,7 +1214,8 @@ r_entry0(VALUE v, st_index_t num, struct load_arg *arg) else { st_insert(arg->data, num, (st_data_t)v); } - if (arg->infection) { + if (arg->infection && + TYPE(v) != T_CLASS && TYPE(v) != T_MODULE) { FL_SET(v, arg->infection); if ((VALUE)real_obj != Qundef) FL_SET((VALUE)real_obj, arg->infection); |