diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-11 06:16:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-11 06:16:03 +0000 |
commit | 0c551b7a6de46e54e4c273c4b7959aae362d5aa2 (patch) | |
tree | bb3b61e5960e01df8b5793e48cda6cd47c21c253 /test/ruby/test_process.rb | |
parent | 72c96011ea9251e1f2bf9e4fc1edfd1a9e9f1a56 (diff) | |
download | ruby-0c551b7a6de46e54e4c273c4b7959aae362d5aa2.tar.gz |
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
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r-- | test/ruby/test_process.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |