From 1e84c8343f38aab16299ddfb7cb20d3e9dabba6f Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 14 Jul 2017 04:43:16 +0000 Subject: 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 --- test/ruby/test_process.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') 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] -- cgit v1.2.3