]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat...
authorSebastian Pipping <sebastian@pipping.org>
Tue, 7 Oct 2025 11:56:31 +0000 (13:56 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 11:56:31 +0000 (13:56 +0200)
commitdea7e3d5f8a63bc8883ca2874ab37c4587e85cda
tree4c0d306a2c754e78647518eb941e7a45e0ab3690
parentf9f8cb92c945640a3e5c89c64e2a992046cc7a95
[3.12] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat` (GH-139403) (GH-139609)

Within libexpat, a parser created via `XML_ExternalEntityParserCreate`
is relying on its parent parser throughout its entire lifetime.
Prior to this fix, is was possible for the parent parser to be
garbage-collected too early.

(cherry picked from commit 6edb2ddb5f3695cf4938979d645f31d7fba43ec8)
Lib/test/test_pyexpat.py
Misc/NEWS.d/next/Security/2025-09-29-00-01-28.gh-issue-139400.X2T-jO.rst [new file with mode: 0644]
Modules/pyexpat.c