mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
9be9851623
commit
6d4fb98e59
1 changed files with 1 additions and 0 deletions
1
random.c
1
random.c
|
@ -387,6 +387,7 @@ rand_init(struct MT *mt, VALUE seed)
|
||||||
len--;
|
len--;
|
||||||
init_by_array(mt, buf, (int)len);
|
init_by_array(mt, buf, (int)len);
|
||||||
}
|
}
|
||||||
|
explicit_bzero(buf, len * sizeof(*buf));
|
||||||
if (buf != buf0) xfree(buf);
|
if (buf != buf0) xfree(buf);
|
||||||
return seed;
|
return seed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue