diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-23 14:36:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-23 14:36:53 +0000 |
commit | 17531a3efbb6c8f14a59ec99d14b97f5cb5859a2 (patch) | |
tree | e5cea5381c97c1c50758837f11367ac3810d5ca1 /process.c | |
parent | 5bff150c4eba7f689b76012bea021e5253c3eb5d (diff) | |
download | ruby-17531a3efbb6c8f14a59ec99d14b97f5cb5859a2.tar.gz ruby-17531a3efbb6c8f14a59ec99d14b97f5cb5859a2.tar.xz ruby-17531a3efbb6c8f14a59ec99d14b97f5cb5859a2.zip |
* process.c (proc_setgroups): check if the argument lenght is
modified. fixed: [ruby-dev:25285]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2697,7 +2697,7 @@ proc_setgroups(VALUE obj, VALUE ary) groups = ALLOCA_N(gid_t, ngroups); - for (i = 0; i < ngroups; i++) { + for (i = 0; i < ngroups && i < RARRAY(ary)->len; i++) { VALUE g = RARRAY(ary)->ptr[i]; if (FIXNUM_P(g)) { |