aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-08 23:55:40 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-09 16:00:04 +0900
commit97485302db2d8c66e7f6a61e38e9d5dd32d1a8c9 (patch)
treea0fcad98ae2e687486dcb10ec05e9ecd56292416 /random.c
parentb0e9db65c3f05e1443c2d8f4ca139182a771500c (diff)
downloadruby-97485302db2d8c66e7f6a61e38e9d5dd32d1a8c9.tar.gz
Also clear MT to initialize the siphash seed
Diffstat (limited to 'random.c')
-rw-r--r--random.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/random.c b/random.c
index 29ac388311..388a3e932a 100644
--- a/random.c
+++ b/random.c
@@ -1479,6 +1479,7 @@ Init_RandomSeedCore(void)
init_seed(&mt);
explicit_bzero(initial_seed, DEFAULT_SEED_LEN);
+ explicit_bzero(&mt, sizeof(mt));
}
static VALUE