]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433) (#107356)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Jul 2023 06:36:45 +0000 (23:36 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Jul 2023 06:36:45 +0000 (06:36 +0000)
commitc7d9976094e5a16140b5279b1197678529121516
treea08c1ce0cd22c5fd7b4970958ae24adc635c0ec7
parent50d26138e67ce30cb61f271ae35f60b2e43d7d38
[3.11] gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433) (#107356)

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