[Python-checkins] byte swap the raw hash secrets (more bpo-32260) (#4773)

Benjamin Peterson webhook-mailer at python.org
Sat Dec 9 16:11:42 EST 2017


https://github.com/python/cpython/commit/60ed1308304964e5648d8bfc9b74bd549570fa83
commit: 60ed1308304964e5648d8bfc9b74bd549570fa83
branch: master
author: Benjamin Peterson <benjamin at python.org>
committer: GitHub <noreply at github.com>
date: 2017-12-09T13:11:39-08:00
summary:

byte swap the raw hash secrets (more bpo-32260) (#4773)

files:
M Python/pyhash.c

diff --git a/Python/pyhash.c b/Python/pyhash.c
index 4494a2f6ef6..1537a0fb490 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);
 }
 



More information about the Python-checkins mailing list