Low firefox Logic Error 🔧 Commit mapped

Overview

Low
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Impactlow
DescriptionIncorrect boundary conditions in the Networking component
ComponentDOM
Bug ClassLogic Error
Tracker2064026
Fix commitc02b8e574951 (firefox) +4/-2
CISA KEVNot listed
CreditedMozilla
Disclosed2026-09-15

Changed Functions

FunctionChangeNotes
if
dom/base/MimeType.cpp
modified

Files Changed

  • dom/base/MimeType.cpp
diff --git a/dom/base/MimeType.cpp b/dom/base/MimeType.cpp
index 1dba5b852ae..d53130ed587 100644
--- a/dom/base/MimeType.cpp
+++ b/dom/base/MimeType.cpp
@@ -110,8 +110,10 @@ template <typename char_type>
       ++pos;
     }
 
-    // Might as well check for base64 now
-    if (*pos != '=') {
+    // Might as well check for base64 now. Note that the loop above may have
+    // stopped because it reached the end of the input, in which case there is
+    // no code point to look at.
+    if (pos == end || *pos != '=') {
       // trim leading and trailing spaces
       while (namePos < pos && NS_IsHTTPWhitespace(*namePos)) {
         ++namePos;
Loading diff…