ruby-changes:39451
From: nobu <ko1@a...>
Date: Tue, 11 Aug 2015 14:57:27 +0900 (JST)
Subject: [ruby-changes:39451] nobu:r51532 (trunk): array.c: fix buffer size
nobu 2015-08-11 14:57:11 +0900 (Tue, 11 Aug 2015) New Revision: 51532 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51532 Log: array.c: fix buffer size * array.c (rb_ary_repeated_permutation): fix buffer size, ALLOCV_N already multiplies element size. Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 51531) +++ array.c (revision 51532) @@ -5179,7 +5179,7 @@ rb_ary_repeated_permutation(VALUE ary, V https://github.com/ruby/ruby/blob/trunk/array.c#L5179 } 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); Index: ChangeLog =================================================================== --- ChangeLog (revision 51531) +++ ChangeLog (revision 51532) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Aug 11 14:57:09 2015 Nobuyoshi Nakada <nobu@r...> + + * 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@j...> * test/openssl/test_ssl.rb: Fix LocalJumpErrors being raised -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/