]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat...
authorSebastian Pipping <sebastian@pipping.org>
Mon, 6 Oct 2025 13:17:37 +0000 (15:17 +0200)
committerGitHub <noreply@github.com>
Mon, 6 Oct 2025 13:17:37 +0000 (15:17 +0200)
commit69ab8fbb8586ddd0a31c965f1ee2a99c35a55d30
treec105a35faafe6bb54153688ad3760cee8b0154bd
parent1d39dba759049ee330b5b35d8f0f46f2a283bc4c
[3.13] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat` (GH-139403) (GH-139608)

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