[前][次][番号順一覧][スレッド一覧]

ruby-changes:59656

From: Nobuyoshi <ko1@a...>
Date: Thu, 9 Jan 2020 16:03:03 +0900 (JST)
Subject: [ruby-changes:59656] 97485302db (master): Also clear MT to initialize the siphash seed

https://git.ruby-lang.org/ruby.git/commit/?id=97485302db

From 97485302db2d8c66e7f6a61e38e9d5dd32d1a8c9 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 8 Jan 2020 23:55:40 +0900
Subject: Also clear MT to initialize the siphash seed


diff --git a/random.c b/random.c
index 29ac388..388a3e9 100644
--- a/random.c
+++ b/random.c
@@ -1479,6 +1479,7 @@ Init_RandomSeedCore(void) https://github.com/ruby/ruby/blob/trunk/random.c#L1479
     init_seed(&mt);
 
     explicit_bzero(initial_seed, DEFAULT_SEED_LEN);
+    explicit_bzero(&mt, sizeof(mt));
 }
 
 static VALUE
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]