]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat...
authorSebastian Pipping <sebastian@pipping.org>
Tue, 7 Oct 2025 11:52:10 +0000 (13:52 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 11:52:10 +0000 (13:52 +0200)
commit598165e3739c68f7d08171b645b32c2201497aa0
tree2f0e6646733af35c5df862089f50eaf5b21fefd8
parent4dea0fb67b7064eb637d859de0b5d3ce4989bd1c
[3.9] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat` (GH-139403) (GH-139614)

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