Firefox · DOM
CVE-2026-117939
Logic Error in DOM
Overview
High
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Files Changed
dom/xml/nsXMLContentSink.cppparser/html/nsHtml5TreeOperation.cpp
Patch
diff --git a/dom/xml/nsXMLContentSink.cpp b/dom/xml/nsXMLContentSink.cpp
index 263008e0701..a8870e43f94 100644
--- a/dom/xml/nsXMLContentSink.cpp
+++ b/dom/xml/nsXMLContentSink.cpp
@@ -518,7 +518,7 @@ nsresult nsXMLContentSink::CreateElement(
HasCustomElementRegistryAttr(aAtts);
// Step 7: Look up a custom element definition.
- CustomElementDefinition* customElementDefinition = nullptr;
+ RefPtr<CustomElementDefinition> customElementDefinition;
nsAtom* nameAtom = ni->NameAtom();
if (!hasCustomElementRegistryAttr && mDocument &&
!mDocument->IsLoadedAsData() && isXHTMLOrXUL &&
diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp
index c0470efb683..2ad605a58e3 100644
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -716,7 +716,7 @@ nsIContent* nsHtml5TreeOperation::CreateHTMLElement(
// 7. Let definition be the result of looking up a custom element definition
// given registry, namespace, localName, and is.
const bool isCustomElement = aCreator == NS_NewCustomElement || isAtom;
- CustomElementDefinition* customElementDefinition = nullptr;
+ RefPtr<CustomElementDefinition> customElementDefinition;
/// customElementDefinition is only used if willExecuteScript is true,
/// which will only be the case if parser is not in fragment parsing.
Loading diff…
References
On This Page