]> granicus.if.org Git - python/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:17:07 +0000 (04:17 -0700)
committerGitHub <noreply@github.com>
Sun, 13 May 2018 11:17:07 +0000 (04:17 -0700)
commit8ed545f6de37efdadbcf71c45bb8136b8cb9619d
tree414b4804a0230b6650cbe7e02e620685e804e351
parent6e9456e4f6123b13750a10e6ae2eba83504d2f1a
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