summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-14 04:43:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-14 04:43:16 +0000
commit1e84c8343f38aab16299ddfb7cb20d3e9dabba6f (patch)
tree05b8493a73b83239d408905a05b554346ffe446a /test
parenta39ad0f0652608ec40aa27280b9400e9858b794a (diff)
process.c: null bytes
* process.c (rlimit_type_by_sym): prohibit null bytes in key names. [ruby-core:82033] [Bug #13744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 41b8b68d9d..d8b55b35c1 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -254,6 +254,10 @@ class TestProcess < Test::Unit::TestCase
system("#{RUBY}", '-e', 'exit', :rlimit_bogus => 123)
end
end;
+
+ assert_raise(ArgumentError, /rlimit_cpu/) {
+ system(RUBY, '-e', 'exit', "rlimit_cpu\0".to_sym => 3600)
+ }
end
MANDATORY_ENVS = %w[RUBYLIB]