gh-144984: Fix crash in ExternalEntityParserCreate() error paths by raminfp · Pull Request #144992 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Lib/test/test_pyexpat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix crash in :meth:`xml.parsers.expat.xmlparser.ExternalEntityParserCreate`
when an allocation fails. The error paths could dereference NULL ``handlers``
and double-decrement the parent parser's reference count.
16 changes: 7 additions & 9 deletions Modules/pyexpat.c
Loading