diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-05 00:23:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-05 00:23:36 +0000 |
commit | 4a1b9786dc7fc460a438f4ac17c10ae0976ebcf1 (patch) | |
tree | bf8ac1f02baf19e5fe72ef7fad2b01fef19ff763 | |
parent | 1e2a4575748f2632a838d887db928a751e8956e4 (diff) |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | random.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Dec 5 09:23:34 2015 Nobuyoshi Nakada <[email protected]> + + * 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 <[email protected]> * vm.c (ruby_vm_verbose_ptr): make static @@ -567,7 +567,7 @@ fill_random_seed(uint32_t seed[DEFAULT_SEED_CNT]) 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; |