File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Misc/NEWS.d/next/Security Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11:mod: `xml.parsers.expat `: Fixed a crash caused by unbounded C recursion when
22converting deeply nested XML content models with
33:meth: `~xml.parsers.expat.xmlparser.ElementDeclHandler `.
4+ This addresses :cve: `2026-4224 `.
You can’t perform that action at this time.
0 commit comments