mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
array.c: fix buffer size
* 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/trunk@51532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c7dc6a34b5
commit
0a8a321558
2 changed files with 6 additions and 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
|
||||
|
|
2
array.c
2
array.c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue