summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 16:03:42 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 16:03:42 +0000
commitf2edb94ee71a8ba34e31f7a30482e2255ecb4acf (patch)
tree3d1c50128755c27adc564942a47997dd02bc29ba /array.c
parent40270906824a981652719c5e614c2cf4d1c234b0 (diff)
merge revision(s) 51532: [Backport #11433]
* array.c (rb_ary_repeated_permutation): fix buffer size, ALLOCV_N already multiplies element size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 82a4d359ab..c255e096ed 100644
--- a/array.c
+++ b/array.c
@@ -5097,7 +5097,7 @@ rb_ary_repeated_permutation(VALUE ary, VALUE num)
}
else { /* this is the general case */
volatile VALUE t0;
- long *p = ALLOCV_N(long, t0, r * sizeof(long));
+ long *p = ALLOCV_N(long, t0, r);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
RBASIC_CLEAR_CLASS(ary0);