summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--random.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 88f42bd..727c2f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Dec 5 09:23:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@80x24.org>
* vm.c (ruby_vm_verbose_ptr): make static
diff --git a/random.c b/random.c
index 0ce2aef..05815c0 100644
--- a/random.c
+++ b/random.c
@@ -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;