diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | array.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Aug 11 14:57:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * array.c (rb_ary_repeated_permutation): fix buffer size, ALLOCV_N + already multiplies element size. + Tue Aug 11 12:13:20 2015 Jeremy Evans <merch-redmine@jeremyevans.net> * test/openssl/test_ssl.rb: Fix LocalJumpErrors being raised @@ -5179,7 +5179,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); |