From 6d4fb98e59e74bb23329314482ef8012bf90aa92 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 14 May 2016 23:21:31 +0000 Subject: random.c: clear seed * random.c (rand_init): clear packed seed value explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- random.c | 1 + 1 file changed, 1 insertion(+) diff --git a/random.c b/random.c index 1770adf138..3be22a4ec0 100644 --- a/random.c +++ b/random.c @@ -387,6 +387,7 @@ rand_init(struct MT *mt, VALUE seed) len--; init_by_array(mt, buf, (int)len); } + explicit_bzero(buf, len * sizeof(*buf)); if (buf != buf0) xfree(buf); return seed; } -- cgit v1.2.3