Go to file
Sebastian Pipping 6acb0a4737 Resolve call to srand, use more entropy
Since commit e3e81a6d9f
(released with Expat 2.1.0) Expat called srand by itself
from inside generate_hash_secret_salt for an instance
of XML_Parser if XML_SetHashSalt was either (a) not called
for that instance or if (b) salt 0 was passed to XML_SetHashSalt
prior to parsing.  That call to srand passed (rather litle)
entropy extracted from the current time as a seed for srand.

That call to srand (1) broke repeatability for code calling
srand with a non-random seed prior to parsing with Expat,
and (2) resulted in a rather small set of hashing salts in
Expat in total.

For a short- to mid-term fix, the new approach avoids calling
srand altogether, extracts more entropy out of the clock and
adds some additional entropy from the process ID, too.

For a long term fix, we may want to read sizeof(long) bytes
from a source like getrandom(..) on Linux, and from similar
sources on other supported architectures.

https://bugzilla.redhat.com/show_bug.cgi?id=1197087
2016-03-20 20:20:57 +01:00
expat Resolve call to srand, use more entropy 2016-03-20 20:20:57 +01:00
htdocs Fill release date 2016-03-12 04:21:09 +01:00
testdata wrapped some long lines 2003-09-12 03:52:18 +00:00
.gitignore Initial Revision 1997-11-04 05:43:52 +00:00