Skip to content

Commit 1481875

Browse files
Add issue number
1 parent 2d3bdd0 commit 1481875

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Lib/test/test_pyexpat.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,13 @@ def test_trigger_leak(self):
706706
@support.skip_wasi_stack_overflow()
707707
def test_deeply_nested_content_model(self):
708708
# This should raise a RecursionError and not crash.
709-
# See https://github.com/python/cpython/issues/
709+
# See https://github.com/python/cpython/issues/145986
710710
N = 500_000
711-
data = (b'<!DOCTYPE root [\n<!ELEMENT root '
711+
data = (
712+
b'<!DOCTYPE root [\n<!ELEMENT root '
712713
+ b'(a, ' * N + b'a' + b')' * N
713-
+ b'>\n]>\n<root/>\n')
714+
+ b'>\n]>\n<root/>\n'
715+
)
714716

715717
parser = expat.ParserCreate()
716718
parser.ElementDeclHandler = lambda _1, _2: None

Misc/NEWS.d/next/Library/2026-03-14-17-31-39.gh-issue-111111.ifSSr8.rst renamed to Misc/NEWS.d/next/Security/2026-03-14-17-31-39.gh-issue-145986.ifSSr8.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
:mod:`xml.parsers.expat`: Fixed a crash caused by unbounded C recursion when
22
converting deeply nested XML content models with
33
:meth:`~xml.parsers.expat.xmlparser.ElementDeclHandler`.
4+
This addresses :cve:`2026-4224`.

0 commit comments

Comments
 (0)