Double `Py_DECREF` on parent parser in `pyexpat.xmlparser.ExternalEntityParserCreate` error paths · Issue #145989 · python/cpython · GitHub

github.com

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

extension-modulesC modules in the Modules dir

type-crashA hard crash of the interpreter, possibly with a core dump

https://github.com/python/cpython/blob/main/Modules/pyexpat.c#L1097

ExternalEntityParserCreate_impl() in Modules/pyexpat.c increments the parent parser's refcount early, stores it in new_parser->parent, then on three separate allocation failure paths does:

gh-145989: Fix double Py_DECREF in pyexpat ExternalEntityParserCreate #146017

⌂git
1/1