ruby-changes:40812
From: nobu <ko1@a...>
Date: Sat, 5 Dec 2015 09:23:56 +0900 (JST)
Subject: [ruby-changes:40812] nobu:r52891 (trunk): random.c: fix filling size
nobu 2015-12-05 09:23:36 +0900 (Sat, 05 Dec 2015) New Revision: 52891 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52891 Log: random.c: fix filling size * random.c (fill_random_seed): fix the size to be filled, not the size of element, but the whole size of array. Modified files: trunk/ChangeLog trunk/random.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52890) +++ ChangeLog (revision 52891) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Dec 5 09:23:34 2015 Nobuyoshi Nakada <nobu@r...> + + * random.c (fill_random_seed): fix the size to be filled, not the + size of element, but the whole size of array. + Sat Dec 5 06:03:54 2015 Eric Wong <e@8...> * vm.c (ruby_vm_verbose_ptr): make static Index: random.c =================================================================== --- random.c (revision 52890) +++ random.c (revision 52891) @@ -567,7 +567,7 @@ fill_random_seed(uint32_t seed[DEFAULT_S https://github.com/ruby/ruby/blob/trunk/random.c#L567 memset(seed, 0, DEFAULT_SEED_LEN); - fill_random_bytes(seed, sizeof(*seed), TRUE); + fill_random_bytes(seed, DEFAULT_SEED_LEN, TRUE); gettimeofday(&tv, 0); seed[0] ^= tv.tv_usec; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/