summaryrefslogtreecommitdiffstats
path: root/Python/pyhash.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-12-09 21:11:39 (GMT)
committerGitHub <noreply@github.com>2017-12-09 21:11:39 (GMT)
commit60ed1308304964e5648d8bfc9b74bd549570fa83 (patch)
tree5cf3f6ef32b31701fc60f347283fcbcc122a41d4 /Python/pyhash.c
parent83620773eef7380178ba84217a26fe22d1636474 (diff)
downloadcpython-60ed1308304964e5648d8bfc9b74bd549570fa83.zip
cpython-60ed1308304964e5648d8bfc9b74bd549570fa83.tar.gz
cpython-60ed1308304964e5648d8bfc9b74bd549570fa83.tar.bz2
byte swap the raw hash secrets (more bpo-32260) (#4773)
Diffstat (limited to 'Python/pyhash.c')
-rw-r--r--Python/pyhash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pyhash.c b/Python/pyhash.c
index 4494a2f..1537a0f 100644
--- a/Python/pyhash.c
+++ b/Python/pyhash.c
@@ -415,7 +415,7 @@ siphash24(uint64_t k0, uint64_t k1, const void *src, Py_ssize_t src_sz) {
static Py_hash_t
pysiphash(const void *src, Py_ssize_t src_sz) {
return (Py_hash_t)siphash24(
- _Py_HashSecret.siphash.k0, _Py_HashSecret.siphash.k1,
+ _le64toh(_Py_HashSecret.siphash.k0), _le64toh(_Py_HashSecret.siphash.k1),
src, src_sz);
}