Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP2
expat.36378
expat-CVE-2024-50602.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File expat-CVE-2024-50602.patch of Package expat.36378
From 51c7019069b862e88d94ed228659e70bddd5de09 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping <sebastian@pipping.org> Date: Mon, 21 Oct 2024 01:42:54 +0200 Subject: [PATCH 1/3] lib: Make XML_StopParser refuse to stop/suspend an unstarted parser --- expat/lib/expat.h | 4 +++- expat/lib/xmlparse.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) Index: expat-2.2.5/lib/expat.h =================================================================== --- expat-2.2.5.orig/lib/expat.h +++ expat-2.2.5/lib/expat.h @@ -124,7 +124,9 @@ enum XML_Error { XML_ERROR_RESERVED_PREFIX_XMLNS, XML_ERROR_RESERVED_NAMESPACE_URI, /* Added in 2.2.1. */ - XML_ERROR_INVALID_ARGUMENT + XML_ERROR_INVALID_ARGUMENT, + /* Added in 2.6.4. */ + XML_ERROR_NOT_STARTED, }; enum XML_Content_Type { Index: expat-2.2.5/lib/xmlparse.c =================================================================== --- expat-2.2.5.orig/lib/xmlparse.c +++ expat-2.2.5/lib/xmlparse.c @@ -2128,6 +2128,9 @@ XML_StopParser(XML_Parser parser, XML_Bo if (parser == NULL) return XML_STATUS_ERROR; switch (parser->m_parsingStatus.parsing) { + case XML_INITIALIZED: + parser->m_errorCode = XML_ERROR_NOT_STARTED; + return XML_STATUS_ERROR; case XML_SUSPENDED: if (resumable) { parser->m_errorCode = XML_ERROR_SUSPENDED; @@ -2138,7 +2141,7 @@ XML_StopParser(XML_Parser parser, XML_Bo case XML_FINISHED: parser->m_errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; - default: + case XML_PARSING: if (resumable) { #ifdef XML_DTD if (parser->m_isParamEntity) { @@ -2150,6 +2153,9 @@ XML_StopParser(XML_Parser parser, XML_Bo } else parser->m_parsingStatus.parsing = XML_FINISHED; + break; + default: + assert(0); } return XML_STATUS_OK; } @@ -2414,6 +2420,9 @@ XML_ErrorString(enum XML_Error code) /* Added in 2.2.5. */ case XML_ERROR_INVALID_ARGUMENT: /* Constant added in 2.2.1, already */ return XML_L("invalid argument"); + /* Added in 2.6.4. */ + case XML_ERROR_NOT_STARTED: + return XML_L("parser not started"); } return NULL; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor