mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
random.c: clear buf
* random.c (random_seed): clear temporary buffer explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
be33635cd8
commit
678c39dc44
1 changed files with 4 additions and 1 deletions
5
random.c
5
random.c
|
@ -600,9 +600,12 @@ make_seed_value(const uint32_t *ptr)
|
||||||
static VALUE
|
static VALUE
|
||||||
random_seed(void)
|
random_seed(void)
|
||||||
{
|
{
|
||||||
|
VALUE v;
|
||||||
uint32_t buf[DEFAULT_SEED_CNT];
|
uint32_t buf[DEFAULT_SEED_CNT];
|
||||||
fill_random_seed(buf);
|
fill_random_seed(buf);
|
||||||
return make_seed_value(buf);
|
v = make_seed_value(buf);
|
||||||
|
explicit_bzero(buf, DEFAULT_SEED_LEN);
|
||||||
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue