summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-23 14:36:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-23 14:36:53 +0000
commit4b5138d8888ad958ffc882f79d386083b5175da4 (patch)
treefac86c3f4405c8cb0cc982c2c4e3c6ea74c25459
parentadfb4c3ba8796c11a7ab6ab02a878dbac0967079 (diff)
* process.c (proc_setgroups): check if the argument lenght is
modified. fixed: [ruby-dev:25285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--process.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f263485ba8..886bfa1102 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/process.c b/process.c
index 67c4d3816b..9541c600d3 100644
--- a/process.c
+++ b/process.c
@@ -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)) {