File mozjs52-CVE-2024-50602_part02_5fb89e7b.patch of Package mozjs60.42005

From 5fb89e7b3afa1c314b34834fe729cd063f65a4d4 Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Mon, 21 Oct 2024 01:46:11 +0200
Subject: [PATCH] lib: Be explicit about XML_PARSING in XML_StopParser

--- a/parser/expat/lib/xmlparse.c
+++ b/parser/expat/lib/xmlparse.c
@@ -2132,7 +2132,7 @@
   case XML_FINISHED:
     errorCode = XML_ERROR_FINISHED;
     return XML_STATUS_ERROR;
-  default:
+  case XML_PARSING:
     if (resumable) {
 #ifdef XML_DTD
       if (isParamEntity) {
@@ -2144,6 +2144,9 @@
     }
     else
       ps_parsing = XML_FINISHED;
+    break;
+  default:
+    assert(0);
   }
   return XML_STATUS_OK;
 }
openSUSE Build Service is sponsored by