summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-02-21 16:08:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-02-21 16:08:50 (GMT)
commit69e9727657dad167215b656de910d95cefe1ee45 (patch)
treee90351e4f45e2f07dbd3bb4c877da686075fec1e /Modules
parent9571155ae4ff86b4275950fcdfadcc76475943e3 (diff)
downloadcpython-69e9727657dad167215b656de910d95cefe1ee45.zip
cpython-69e9727657dad167215b656de910d95cefe1ee45.tar.gz
cpython-69e9727657dad167215b656de910d95cefe1ee45.tar.bz2
ensure no one tries to hash things before the random seed is found
Diffstat (limited to 'Modules')
-rw-r--r--Modules/datetimemodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index f3103ea..5401068 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -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;