From 0c551b7a6de46e54e4c273c4b7959aae362d5aa2 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 11 Oct 2017 06:16:03 +0000 Subject: process.c: null byte at initgroups * process.c (proc_initgroups): check null byte. patched by tommy (Masahiro Tomita) in [ruby-dev:50287]. [Bug #13995] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby/test_process.rb') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 7bd38c8fed..f300444ecc 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2339,4 +2339,12 @@ EOS assert_equal pid, Timeout.timeout(30) { Process.wait(pid) } end; end + + if Process.respond_to?(:initgroups) + def test_initgroups + assert_raise(ArgumentError) do + Process.initgroups("\0", 0) + end + end + end end -- cgit v1.2.3