ensure no one tries to hash things before the random seed is found

This commit is contained in:
Benjamin Peterson 2012-02-21 11:08:50 -05:00
parent 9571155ae4
commit 69e9727657
5 changed files with 15 additions and 4 deletions

View file

@ -2565,6 +2565,7 @@ generic_hash(unsigned char *data, int len)
register unsigned char *p;
register long x;
assert(_Py_HashSecret_Initialized);
p = (unsigned char *) data;
x = _Py_HashSecret.prefix;
x ^= *p << 7;