From 58772d711059308d874b092f42ef4a8ac65add3d Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 6 Jun 2010 10:56:45 +0000 Subject: [PATCH] * array.c (rb_ary_product): clear uninitialized elements in temporary array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ array.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2986136c77..a583d5ca74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 6 19:55:21 2010 Tanaka Akira + + * array.c (rb_ary_product): clear uninitialized elements in temporary + array. + Sun Jun 6 12:31:57 2010 Narihiro Nakamura * gc.c: set_heaps_increment is not diff --git a/array.c b/array.c index 35335f5437..04c244a385 100644 --- a/array.c +++ b/array.c @@ -4308,6 +4308,7 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary) /* initialize the arrays of arrays */ ARY_SET_LEN(t0, n); arrays[0] = ary; + for (i = 1; i < n; i++) arrays[i] = Qnil; for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]); /* initialize the counters for the arrays */