diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | process.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Dec 23 23:36:28 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * process.c (proc_setgroups): check if the argument lenght is + modified. fixed: [ruby-dev:25285] + Thu Dec 23 13:13:33 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tcltklib/tcltklib.c: define TclTkLib::COMPILE_INFO and @@ -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)) { |