Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5187: uuid\seed_rng.hpp sha1_random_digest_state_ not random
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-17 03:38:52
#5187: uuid\seed_rng.hpp sha1_random_digest_state_ not random
--------------------------------------------+-------------------------------
Reporter: qiaozhiqiang@⦠| Owner: atompkins
Type: Bugs | Status: new
Milestone: To Be Determined | Component: uuid
Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords: seed_rng
--------------------------------------------+-------------------------------
Comment (by anonymous):
{{{
the static value is always initialized, so we should delete
"// intentionally left uninitialized" only ?
but the ps in this line is different in different program,
different build, different module, different DLL...
so ps is random.
static unsigned int * sha1_random_digest_state_()
{
// intentionally left uninitialized
static unsigned int state[ 5 ];
return state;
}
sha.process_bytes( (unsigned char const*)&ps, sizeof( ps ) );
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5187#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC