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 | 4cc9a707382d91a10a28408fa46438da02f7179e (patch) | |
| tree | fac86c3f4405c8cb0cc982c2c4e3c6ea74c25459 /process.c | |
| parent | cdc5bd3459ec8b3482b1f3d58675bd4e30c64025 (diff) | |
| download | ruby-4cc9a707382d91a10a28408fa46438da02f7179e.tar.gz ruby-4cc9a707382d91a10a28408fa46438da02f7179e.tar.xz ruby-4cc9a707382d91a10a28408fa46438da02f7179e.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/branches/ruby_1_8@7642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
| -rw-r--r-- | process.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2464,7 +2464,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)) { |
