File mozjs128-CVE-2024-50602-part02-5fb89e7b.patch of Package mozjs78.36807
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
---
expat/lib/xmlparse.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/parser/expat/lib/xmlparse.c
+++ b/parser/expat/lib/xmlparse.c
@@ -2151,7 +2151,7 @@
case XML_FINISHED:
errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
- default:
+ case XML_PARSING:
if (resumable) {
#ifdef XML_DTD
if (isParamEntity) {
@@ -2163,6 +2163,9 @@
}
else
ps_parsing = XML_FINISHED;
+ break;
+ default:
+ assert(0)
}
return XML_STATUS_OK;
}