aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/pymath.c
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-10-10 15:42:03 +0300
committerGitHub <noreply@github.com>2024-10-10 14:42:03 +0200
commit87d7315ac57250046372b0d9ae4619ba619c8c87 (patch)
tree3faebb9b68976d101e1f0433f4c8eb1e3e65c4b1 /Python/pymath.c
parente4cab488d4445e8444932f3bed1c329c0d9e5038 (diff)
downloadcpython-87d7315ac57250046372b0d9ae4619ba619c8c87.tar.gz
cpython-87d7315ac57250046372b0d9ae4619ba619c8c87.zip
gh-125118: don't copy arbitrary values to _Bool in the struct module (GH-125169)
memcopy'ing arbitrary values to _Bool variable triggers undefined behaviour. Avoid this. We assume that `false` is represented by all zero bytes. Credits to Alex Gaynor. Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to 'Python/pymath.c')
0 files changed, 0 insertions, 0 deletions