diff options
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4639,10 +4639,10 @@ proc_setgroups(VALUE obj, VALUE ary) Check_Type(ary, T_ARRAY); - if (RARRAY_LEN(ary) > maxgroups()) + ngroups = RARRAY_LENINT(ary); + if (ngroups > maxgroups()) rb_raise(rb_eArgError, "too many groups, %d max", maxgroups()); - ngroups = RARRAY_LENINT(ary); groups = ALLOCA_N(rb_gid_t, ngroups); for (i = 0; i < ngroups; i++) { |