]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433) (#107355)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 27 Jul 2023 20:52:39 +0000 (13:52 -0700)
committerGitHub <noreply@github.com>
Thu, 27 Jul 2023 20:52:39 +0000 (13:52 -0700)
commit5daf19d763826a977a596b6fbc035ee03c0deafc
treeb76616d7e6f31895c49be68cb3ace056803b7e0c
parentc580527d9230212e8f8d697a18b86120109aa653
[3.12] gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433) (#107355)

gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433)

Fix potential unaligned memory access on C APIs involving returned sequences
of `char *` pointers within the :mod:`grp` and :mod:`socket` modules. These
were revealed using a ``-fsaniziter=alignment`` build on ARM macOS.
(cherry picked from commit f01e4cedba1a17d321664834bb255d9d04ad16ce)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Misc/NEWS.d/next/Core and Builtins/2023-07-27-11-47-29.gh-issue-104432.oGHF-z.rst [new file with mode: 0644]
Modules/grpmodule.c
Modules/socketmodule.c