mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
|
|
@ -1209,6 +1209,7 @@ string_hash(PyStringObject *a)
|
|||
register unsigned char *p;
|
||||
register long x;
|
||||
|
||||
assert(_Py_HashSecret_Initialized);
|
||||
if (a->ob_shash != -1)
|
||||
return a->ob_shash;
|
||||
len = Py_SIZE(a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue