diff options
author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-10-10 12:42:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 12:42:03 (GMT) |
commit | 87d7315ac57250046372b0d9ae4619ba619c8c87 (patch) | |
tree | 3faebb9b68976d101e1f0433f4c8eb1e3e65c4b1 /Include | |
parent | e4cab488d4445e8444932f3bed1c329c0d9e5038 (diff) | |
download | cpython-87d7315ac57250046372b0d9ae4619ba619c8c87.zip cpython-87d7315ac57250046372b0d9ae4619ba619c8c87.tar.gz cpython-87d7315ac57250046372b0d9ae4619ba619c8c87.tar.bz2 |
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 'Include')
0 files changed, 0 insertions, 0 deletions