update(expat): version 2.6.4 (#4760) (#4767)

This commit is contained in:
Matej Kenda 2024-11-13 18:59:32 +01:00 committed by GitHub
parent c4f66d5188
commit fe27933a12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 6 deletions

View File

@ -130,7 +130,9 @@ enum XML_Error {
/* Added in 2.3.0. */ /* Added in 2.3.0. */
XML_ERROR_NO_BUFFER, XML_ERROR_NO_BUFFER,
/* Added in 2.4.0. */ /* Added in 2.4.0. */
XML_ERROR_AMPLIFICATION_LIMIT_BREACH XML_ERROR_AMPLIFICATION_LIMIT_BREACH,
/* Added in 2.6.4. */
XML_ERROR_NOT_STARTED,
}; };
enum XML_Content_Type { enum XML_Content_Type {
@ -1066,7 +1068,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
*/ */
#define XML_MAJOR_VERSION 2 #define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 6 #define XML_MINOR_VERSION 6
#define XML_MICRO_VERSION 3 #define XML_MICRO_VERSION 4
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -1,4 +1,4 @@
/* ba4cdf9bdb534f355a9def4c9e25d20ee8e72f95b0a4d930be52e563f5080196 (2.6.3+) /* c5625880f4bf417c1463deee4eb92d86ff413f802048621c57e25fe483eb59e4 (2.6.4+)
__ __ _ __ __ _
___\ \/ /_ __ __ _| |_ ___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __| / _ \\ /| '_ \ / _` | __|
@ -40,6 +40,7 @@
Copyright (c) 2023 Owain Davies <owaind@bath.edu> Copyright (c) 2023 Owain Davies <owaind@bath.edu>
Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <snild@sony.com> Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <snild@sony.com>
Copyright (c) 2024 Berkay Eren Ürün <berkay.ueruen@siemens.com> Copyright (c) 2024 Berkay Eren Ürün <berkay.ueruen@siemens.com>
Copyright (c) 2024 Hanno Böck <hanno@gentoo.org>
Licensed under the MIT license: Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
@ -2252,6 +2253,9 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable) {
if (parser == NULL) if (parser == NULL)
return XML_STATUS_ERROR; return XML_STATUS_ERROR;
switch (parser->m_parsingStatus.parsing) { switch (parser->m_parsingStatus.parsing) {
case XML_INITIALIZED:
parser->m_errorCode = XML_ERROR_NOT_STARTED;
return XML_STATUS_ERROR;
case XML_SUSPENDED: case XML_SUSPENDED:
if (resumable) { if (resumable) {
parser->m_errorCode = XML_ERROR_SUSPENDED; parser->m_errorCode = XML_ERROR_SUSPENDED;
@ -2262,7 +2266,7 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable) {
case XML_FINISHED: case XML_FINISHED:
parser->m_errorCode = XML_ERROR_FINISHED; parser->m_errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR; return XML_STATUS_ERROR;
default: case XML_PARSING:
if (resumable) { if (resumable) {
#ifdef XML_DTD #ifdef XML_DTD
if (parser->m_isParamEntity) { if (parser->m_isParamEntity) {
@ -2273,6 +2277,9 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable) {
parser->m_parsingStatus.parsing = XML_SUSPENDED; parser->m_parsingStatus.parsing = XML_SUSPENDED;
} else } else
parser->m_parsingStatus.parsing = XML_FINISHED; parser->m_parsingStatus.parsing = XML_FINISHED;
break;
default:
assert(0);
} }
return XML_STATUS_OK; return XML_STATUS_OK;
} }
@ -2537,6 +2544,9 @@ XML_ErrorString(enum XML_Error code) {
case XML_ERROR_AMPLIFICATION_LIMIT_BREACH: case XML_ERROR_AMPLIFICATION_LIMIT_BREACH:
return XML_L( return XML_L(
"limit on input amplification factor (from DTD and entities) breached"); "limit on input amplification factor (from DTD and entities) breached");
/* Added in 2.6.4. */
case XML_ERROR_NOT_STARTED:
return XML_L("parser not started");
} }
return NULL; return NULL;
} }
@ -7874,7 +7884,7 @@ accountingReportDiff(XML_Parser rootParser,
assert(! rootParser->m_parentParser); assert(! rootParser->m_parentParser);
fprintf(stderr, fprintf(stderr,
" (+" EXPAT_FMT_PTRDIFF_T("6") " bytes %s|%d, xmlparse.c:%d) %*s\"", " (+" EXPAT_FMT_PTRDIFF_T("6") " bytes %s|%u, xmlparse.c:%d) %*s\"",
bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP", bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP",
levelsAwayFromRootParser, source_line, 10, ""); levelsAwayFromRootParser, source_line, 10, "");
@ -7987,7 +7997,7 @@ entityTrackingReportStats(XML_Parser rootParser, ENTITY *entity,
fprintf( fprintf(
stderr, stderr,
"expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n", "expat: Entities(%p): Count %9u, depth %2u/%2u %*s%s%s; %s length %d (xmlparse.c:%d)\n",
(void *)rootParser, rootParser->m_entity_stats.countEverOpened, (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
rootParser->m_entity_stats.currentDepth, rootParser->m_entity_stats.currentDepth,
rootParser->m_entity_stats.maximumDepthSeen, rootParser->m_entity_stats.maximumDepthSeen,