]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 13 May 2018 11:40:03 +0000 (04:40 -0700)
committerGitHub <noreply@github.com>
Sun, 13 May 2018 11:40:03 +0000 (04:40 -0700)
commit0d17e60b33aca1a4d151a8a2bd6eaa331f0ec658
tree1f5f05ed93b25abca890d8718d52ee0e935e3057
parent308dbe03887a60a192860bc533af15e7520169a6
bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123)

The hash implementation casts the input pointer to uint64_t* and directly reads
from this, which may cause unaligned accesses. Use memcpy() instead so this code
will not crash with SIGBUS on sparc.

https://bugs.gentoo.org/show_bug.cgi?id=636400
(cherry picked from commit 1e2ec8a996daec65d8d5a3d43b66a9909c6d0653)

Co-authored-by: Rolf Eike Beer <eike@sf-mail.de>
Misc/NEWS.d/next/Core and Builtins/2018-04-25-20-44-42.bpo-28055.f49kfC.rst [new file with mode: 0644]
Python/pyhash.c