1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c (proc_setmaxgroups): added negative value check.

This was suggested by Daniel Berger. Thanks Daniel!
  [ruby-core:35426][Bug#4467]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-03-06 14:28:02 +00:00
parent aca674c2e7
commit beed971728
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Sun Mar 6 23:26:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* process.c (proc_setmaxgroups): added negative value check.
This was suggested by Daniel Berger. Thanks Daniel!
[ruby-core:35426][Bug#4467]
Sun Mar 6 23:18:23 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* process.c (maxgroups, proc_setmaxgroups): increase max groups

View file

@ -4713,7 +4713,10 @@ proc_getmaxgroups(VALUE obj)
static VALUE
proc_setmaxgroups(VALUE obj, VALUE val)
{
int ngroups = FIX2UINT(val);
int ngroups = FIX2INT(val);
if (ngroups <= 0)
rb_raise(rb_eArgError, "maxgroups %d shold be positive", ngroups);
if (ngroups > RB_MAX_GROUPS)
ngroups = RB_MAX_GROUPS;