]> granicus.if.org Git - python/commit
bpo-18407: win32_urandom() uses PY_DWORD_MAX (GH-10656)
authorVictor Stinner <vstinner@redhat.com>
Thu, 22 Nov 2018 13:43:07 +0000 (14:43 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Nov 2018 13:43:07 +0000 (14:43 +0100)
commitc48ff73dd60bec5dcbe64bedeff91e6db26d98bc
tree4f8c01541d1bfb792f3d3c3c8e5f6d3c7c55bc21
parent28f468cb19e3097079b7ce7850e6048de99022fa
bpo-18407: win32_urandom() uses PY_DWORD_MAX (GH-10656)

CryptGenRandom() maximum size is PY_DWORD_MAX, not INT_MAX.
Use DWORD type for the 'chunk' variable

Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com>
Python/bootstrap_hash.c