[3.7] bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373) by miss-islington · Pull Request #11376 · python/cpython

@gpshead @miss-islington

…11373)

Use crypt_r() when available instead of crypt() in the crypt module.

As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
(cherry picked from commit 387512c)

Co-authored-by: Gregory P. Smith <greg@krypto.org>