]> granicus.if.org Git - python/commit
bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123)
authorRolf Eike Beer <eike@sf-mail.de>
Sun, 13 May 2018 10:57:31 +0000 (12:57 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 13 May 2018 10:57:31 +0000 (13:57 +0300)
commit1e2ec8a996daec65d8d5a3d43b66a9909c6d0653
treedf22f6c057afff4a95edf1d2b795fe47e33ec531
parent7ec8f28656ea9d84048e9b5655375c6a74a59f53
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
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