Skip to content

Commit

Permalink
Update Expat library to version 2.6.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
enzo1982 committed Apr 14, 2024
1 parent 096e841 commit bca49e1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/playlist/xspf/expat/expat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 6
#define XML_MICRO_VERSION 1
#define XML_MICRO_VERSION 2

#ifdef __cplusplus
}
Expand Down
6 changes: 3 additions & 3 deletions components/playlist/xspf/expat/expat_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
#define PACKAGE_NAME "expat"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 2.6.1"
#define PACKAGE_STRING "expat 2.6.2"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "expat"
Expand All @@ -92,15 +92,15 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.6.1"
#define PACKAGE_VERSION "2.6.2"

/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1

/* Version number of package */
#define VERSION "2.6.1"
#define VERSION "2.6.2"

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
Expand Down
10 changes: 7 additions & 3 deletions components/playlist/xspf/expat/xmlparse.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* dd2a9703e301882afe16d198a82689ab225277057f5eab9d079d8606eab736b4 (2.6.1+)
/* 2a14271ad4d35e82bde8ba210b4edb7998794bcbae54deab114046a300f9639a (2.6.2+)
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
Expand Down Expand Up @@ -6240,7 +6240,7 @@ storeEntityValue(XML_Parser parser, const ENCODING *enc,
dtd->keepProcessing = dtd->standalone;
goto endEntityValue;
}
if (entity->open) {
if (entity->open || (entity == parser->m_declEntity)) {
if (enc == parser->m_encoding)
parser->m_eventPtr = entityTextPtr;
result = XML_ERROR_RECURSIVE_ENTITY_REF;
Expand Down Expand Up @@ -7787,14 +7787,18 @@ copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {

static float
accountingGetCurrentAmplification(XML_Parser rootParser) {
// 1.........1.........12 => 22
const size_t lenOfShortestInclude = sizeof("<!ENTITY a SYSTEM 'b'>") - 1;
const XmlBigCount countBytesOutput
= rootParser->m_accounting.countBytesDirect
+ rootParser->m_accounting.countBytesIndirect;
const float amplificationFactor
= rootParser->m_accounting.countBytesDirect
? (countBytesOutput
/ (float)(rootParser->m_accounting.countBytesDirect))
: 1.0f;
: ((lenOfShortestInclude
+ rootParser->m_accounting.countBytesIndirect)
/ (float)lenOfShortestInclude);
assert(! rootParser->m_parentParser);
return amplificationFactor;
}
Expand Down

0 comments on commit bca49e1

Please sign in to comment.