mirror of
https://github.com/python/cpython.git
synced 2025-08-20 16:53:19 +00:00
ensure no one tries to hash things before the random seed is found
This commit is contained in:
parent
b69fa1f8b7
commit
26da920001
4 changed files with 14 additions and 4 deletions
|
@ -6692,6 +6692,7 @@ unicode_hash(PyUnicodeObject *self)
|
|||
register Py_UNICODE *p;
|
||||
register long x;
|
||||
|
||||
assert(_Py_HashSecret_Initialized);
|
||||
if (self->hash != -1)
|
||||
return self->hash;
|
||||
len = PyUnicode_GET_SIZE(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue