]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40412: Nullify inittab_copy during finalization (GH-19746)
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 1 May 2020 18:07:54 +0000 (11:07 -0700)
committerGitHub <noreply@github.com>
Fri, 1 May 2020 18:07:54 +0000 (11:07 -0700)
commit64224a4727321a8dd33e6f769edda401193ebef0
tree92a3bab10fdd5f9b75cae94339917f9d78b32bac
parent831d58d7865cb98fa09227dc614f4f3ce6af968b
bpo-40412: Nullify inittab_copy during finalization (GH-19746)

Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon
Misc/NEWS.d/next/C API/2020-05-01-17-28-04.bpo-40412.dE0D8N.rst [new file with mode: 0644]
Python/import.c