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>
S
Sergey B Kirpichev committed
87d7315ac57250046372b0d9ae4619ba619c8c87
Parent: e4cab48
Committed by GitHub <noreply@github.com>
on 10/10/2024, 12:42:03 PM