From 31148bdea4087cc5c07d445e2c3fc2b2a40817b3 Mon Sep 17 00:00:00 2001 From: ziyangc Date: Mon, 10 Oct 2022 20:43:10 +0800 Subject: [PATCH] backport patches from upstream --- ...th-buffer-in-xmlNewStringInputStream.patch | 54 +++++++++ ...ialize-SAX-handler-in-htmlReadMemory.patch | 28 +++++ ...rser-with-threads-and-without-legacy.patch | 53 +++++++++ ...ory-mixing-up-XML-and-HTML-functions.patch | 26 ++++ ...ort-Fix-memory-leak-with-invalid-XSD.patch | 61 ++++++++++ ...ort-Fix-xmlCtxtReadDoc-with-encoding.patch | 85 +++++++++++++ ...-check-work-with-recursive-invocatio.patch | 112 ++++++++++++++++++ backport-Use-xmlStrlen-in-CtxtReadDoc.patch | 53 +++++++++ ...xmlStrlen-in-xmlNewStringInputStream.patch | 26 ++++ libxml2.spec | 17 ++- 10 files changed, 514 insertions(+), 1 deletion(-) create mode 100644 backport-Create-stream-with-buffer-in-xmlNewStringInputStream.patch create mode 100644 backport-Don-t-initialize-SAX-handler-in-htmlReadMemory.patch create mode 100644 backport-Fix-HTML-parser-with-threads-and-without-legacy.patch create mode 100644 backport-Fix-htmlReadMemory-mixing-up-XML-and-HTML-functions.patch create mode 100644 backport-Fix-memory-leak-with-invalid-XSD.patch create mode 100644 backport-Fix-xmlCtxtReadDoc-with-encoding.patch create mode 100644 backport-Make-XPath-depth-check-work-with-recursive-invocatio.patch create mode 100644 backport-Use-xmlStrlen-in-CtxtReadDoc.patch create mode 100644 backport-Use-xmlStrlen-in-xmlNewStringInputStream.patch diff --git a/backport-Create-stream-with-buffer-in-xmlNewStringInputStream.patch b/backport-Create-stream-with-buffer-in-xmlNewStringInputStream.patch new file mode 100644 index 0000000..58fb888 --- /dev/null +++ b/backport-Create-stream-with-buffer-in-xmlNewStringInputStream.patch @@ -0,0 +1,54 @@ +From b1b654171e44dba90bbc6836ca05dd4e1161b4b0 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Sat, 20 Aug 2022 15:15:04 +0200 +Subject: [PATCH] Create stream with buffer in xmlNewStringInputStream + +Create an input stream with a buffer in xmlNewStringInputStream. +Otherwise, switching encodings won't work. + +See #34. +--- + parserInternals.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/parserInternals.c b/parserInternals.c +index 31d94680..7dc06c88 100644 +--- a/parserInternals.c ++++ b/parserInternals.c +@@ -1345,6 +1345,7 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { + xmlParserInputPtr + xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) { + xmlParserInputPtr input; ++ xmlParserInputBufferPtr buf; + + if (buffer == NULL) { + xmlErrInternal(ctxt, "xmlNewStringInputStream string = NULL\n", +@@ -1354,15 +1355,21 @@ xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) { + if (xmlParserDebugEntities) + xmlGenericError(xmlGenericErrorContext, + "new fixed input: %.30s\n", buffer); ++ buf = xmlParserInputBufferCreateMem((const char *) buffer, ++ strlen((const char *) buffer), ++ XML_CHAR_ENCODING_NONE); ++ if (buf == NULL) { ++ xmlErrMemory(ctxt, NULL); ++ return(NULL); ++ } + input = xmlNewInputStream(ctxt); + if (input == NULL) { + xmlErrMemory(ctxt, "couldn't allocate a new input stream\n"); ++ xmlFreeParserInputBuffer(buf); + return(NULL); + } +- input->base = buffer; +- input->cur = buffer; +- input->length = xmlStrlen(buffer); +- input->end = &buffer[input->length]; ++ input->buf = buf; ++ xmlBufResetInput(input->buf->buffer, input); + return(input); + } + +-- +2.20.1 + diff --git a/backport-Don-t-initialize-SAX-handler-in-htmlReadMemory.patch b/backport-Don-t-initialize-SAX-handler-in-htmlReadMemory.patch new file mode 100644 index 0000000..670976d --- /dev/null +++ b/backport-Don-t-initialize-SAX-handler-in-htmlReadMemory.patch @@ -0,0 +1,28 @@ +From 80bd34c3c650bd68e3c9c3e2308ac1988067ad50 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Mon, 22 Aug 2022 14:06:37 +0200 +Subject: [PATCH] Don't initialize SAX handler in htmlReadMemory + +The SAX handler is already initialized when creating the parser +context. +--- + HTMLparser.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index 2aeb7794..4d2a343e 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -6995,9 +6995,6 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi + ctxt = htmlCreateMemoryParserCtxt(buffer, size); + if (ctxt == NULL) + return (NULL); +- htmlDefaultSAXHandlerInit(); +- if (ctxt->sax != NULL) +- memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1)); + return (htmlDoRead(ctxt, URL, encoding, options, 0)); + } + +-- +2.20.1 + diff --git a/backport-Fix-HTML-parser-with-threads-and-without-legacy.patch b/backport-Fix-HTML-parser-with-threads-and-without-legacy.patch new file mode 100644 index 0000000..3c09a3b --- /dev/null +++ b/backport-Fix-HTML-parser-with-threads-and-without-legacy.patch @@ -0,0 +1,53 @@ +From 38f04779f7afd758db6210123ec0b64c489595c5 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Mon, 22 Aug 2022 13:33:35 +0200 +Subject: [PATCH] Fix HTML parser with threads and --without-legacy + +If the legacy functions are disabled, the default "V1" HTML SAX handler +isn't initialized in threads other than the main thread. +htmlInitParserCtxt would later use the empty V1 SAX handler, resulting +in NULL documents. + +Change htmlInitParserCtxt to initialize the HTML SAX handler by calling +xmlSAX2InitHtmlDefaultSAXHandler. This removes the ability to change the +default handler but is more in line with the XML parser which +initializes the SAX handler by calling xmlSAXVersion, ignoring the V1 +default handler. + +Fixes #399. +--- + HTMLparser.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index 975099ca..ba886908 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -5056,8 +5056,7 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt) + htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n"); + return(-1); + } +- else +- memset(sax, 0, sizeof(htmlSAXHandler)); ++ memset(sax, 0, sizeof(htmlSAXHandler)); + + /* Allocate the Input stack */ + ctxt->inputTab = (htmlParserInputPtr *) +@@ -5116,11 +5115,9 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt) + ctxt->nodeInfoNr = 0; + ctxt->nodeInfoMax = 0; + +- if (sax == NULL) ctxt->sax = (xmlSAXHandlerPtr) &htmlDefaultSAXHandler; +- else { +- ctxt->sax = sax; +- memcpy(sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1)); +- } ++ ctxt->sax = sax; ++ xmlSAX2InitHtmlDefaultSAXHandler(sax); ++ + ctxt->userData = ctxt; + ctxt->myDoc = NULL; + ctxt->wellFormed = 1; +-- +2.20.1 + diff --git a/backport-Fix-htmlReadMemory-mixing-up-XML-and-HTML-functions.patch b/backport-Fix-htmlReadMemory-mixing-up-XML-and-HTML-functions.patch new file mode 100644 index 0000000..6270868 --- /dev/null +++ b/backport-Fix-htmlReadMemory-mixing-up-XML-and-HTML-functions.patch @@ -0,0 +1,26 @@ +From 37cedc0b1563e5e312a924ac07168722a4e768d8 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Mon, 22 Aug 2022 14:04:07 +0200 +Subject: [PATCH] Fix htmlReadMemory mixing up XML and HTML functions + +Also see fe6890e2. +--- + HTMLparser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index 0100dbee..2aeb7794 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -6992,7 +6992,7 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi + htmlParserCtxtPtr ctxt; + + xmlInitParser(); +- ctxt = xmlCreateMemoryParserCtxt(buffer, size); ++ ctxt = htmlCreateMemoryParserCtxt(buffer, size); + if (ctxt == NULL) + return (NULL); + htmlDefaultSAXHandlerInit(); +-- +2.20.1 + diff --git a/backport-Fix-memory-leak-with-invalid-XSD.patch b/backport-Fix-memory-leak-with-invalid-XSD.patch new file mode 100644 index 0000000..dccd1c4 --- /dev/null +++ b/backport-Fix-memory-leak-with-invalid-XSD.patch @@ -0,0 +1,61 @@ +From a09c89545d3ed5b56701abcc5d638faa01c5c903 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Mon, 15 Aug 2022 12:19:25 +0200 +Subject: [PATCH] Fix memory leak with invalid XSD + +xmlSchemaClearElemInfo can add new items to the "matcher" cache, so the +cache must be cleared after calling this function, not before. This +only seems to affect invalid XSDs. + +Fixes #390. +--- + xmlschemas.c | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) + +diff --git a/xmlschemas.c b/xmlschemas.c +index c1c8f4ef..f31d3d1f 100644 +--- a/xmlschemas.c ++++ b/xmlschemas.c +@@ -27821,17 +27821,6 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) + } while (cur != NULL); + vctxt->aidcs = NULL; + } +- if (vctxt->idcMatcherCache != NULL) { +- xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp; +- +- while (matcher) { +- tmp = matcher; +- matcher = matcher->nextCached; +- xmlSchemaIDCFreeMatcherList(tmp); +- } +- vctxt->idcMatcherCache = NULL; +- } +- + + if (vctxt->idcNodes != NULL) { + int i; +@@ -27898,6 +27887,21 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) + xmlFree(vctxt->filename); + vctxt->filename = NULL; + } ++ ++ /* ++ * Note that some cleanup functions can move items to the cache, ++ * so the cache shouldn't be freed too early. ++ */ ++ if (vctxt->idcMatcherCache != NULL) { ++ xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp; ++ ++ while (matcher) { ++ tmp = matcher; ++ matcher = matcher->nextCached; ++ xmlSchemaIDCFreeMatcherList(tmp); ++ } ++ vctxt->idcMatcherCache = NULL; ++ } + } + + /** +-- +2.20.1 + diff --git a/backport-Fix-xmlCtxtReadDoc-with-encoding.patch b/backport-Fix-xmlCtxtReadDoc-with-encoding.patch new file mode 100644 index 0000000..24b526f --- /dev/null +++ b/backport-Fix-xmlCtxtReadDoc-with-encoding.patch @@ -0,0 +1,85 @@ +From 4ad71c2d72beef0d10cf75aa417db10d77846f75 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Sat, 20 Aug 2022 16:19:34 +0200 +Subject: [PATCH] Fix xmlCtxtReadDoc with encoding + +xmlCtxtReadDoc used to create an input stream involving +xmlNewStringInputStream. This would create a stream without an input +buffer, causing problems with encodings (see #34). + +After commit aab584dc3, an error was returned even with UTF-8 encodings +which happened to work before. + +Make xmlCtxtReadDoc call xmlCtxtReadMemory which doesn't suffer from +these issues. Also fix htmlCtxtReadDoc. + +Fixes #397. +--- + HTMLparser.c | 17 ++++------------- + parser.c | 16 +++------------- + 2 files changed, 7 insertions(+), 26 deletions(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index abc4e905..aef82c02 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -7116,22 +7116,13 @@ htmlDocPtr + htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur, + const char *URL, const char *encoding, int options) + { +- xmlParserInputPtr stream; ++ const char *buf; + + if (cur == NULL) + return (NULL); +- if (ctxt == NULL) +- return (NULL); +- xmlInitParser(); +- +- htmlCtxtReset(ctxt); +- +- stream = xmlNewStringInputStream(ctxt, cur); +- if (stream == NULL) { +- return (NULL); +- } +- inputPush(ctxt, stream); +- return (htmlDoRead(ctxt, URL, encoding, options, 1)); ++ buf = (const char *) cur; ++ return (htmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding, ++ options)); + } + + /** +diff --git a/parser.c b/parser.c +index e660b0a7..c313d88a 100644 +--- a/parser.c ++++ b/parser.c +@@ -15359,22 +15359,12 @@ xmlDocPtr + xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur, + const char *URL, const char *encoding, int options) + { +- xmlParserInputPtr stream; ++ const char *buf; + + if (cur == NULL) + return (NULL); +- if (ctxt == NULL) +- return (NULL); +- xmlInitParser(); +- +- xmlCtxtReset(ctxt); +- +- stream = xmlNewStringInputStream(ctxt, cur); +- if (stream == NULL) { +- return (NULL); +- } +- inputPush(ctxt, stream); +- return (xmlDoRead(ctxt, URL, encoding, options, 1)); ++ buf = (const char *) cur; ++ return (xmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding, options)); + } + + /** +-- +2.20.1 + diff --git a/backport-Make-XPath-depth-check-work-with-recursive-invocatio.patch b/backport-Make-XPath-depth-check-work-with-recursive-invocatio.patch new file mode 100644 index 0000000..1e0a8bc --- /dev/null +++ b/backport-Make-XPath-depth-check-work-with-recursive-invocatio.patch @@ -0,0 +1,112 @@ +From 677a42645ef22b5a50741bad5facf9d8a8bc6d21 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Thu, 28 Jul 2022 20:21:24 +0200 +Subject: [PATCH] Make XPath depth check work with recursive invocations + +EXSLT functions like dyn:map or dyn:evaluate invoke xmlXPathRunEval +recursively. Don't set depth to zero but keep and restore the original +value to avoid stack overflows when abusing these functions. +--- + xpath.c | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +diff --git a/xpath.c b/xpath.c +index f59ef41d..4a6f0e21 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -13884,12 +13884,11 @@ static int + xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool) + { + xmlXPathCompExprPtr comp; ++ int oldDepth; + + if ((ctxt == NULL) || (ctxt->comp == NULL)) + return(-1); + +- ctxt->context->depth = 0; +- + if (ctxt->valueTab == NULL) { + /* Allocate the value stack */ + ctxt->valueTab = (xmlXPathObjectPtr *) +@@ -13943,11 +13942,13 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool) + "xmlXPathRunEval: last is less than zero\n"); + return(-1); + } ++ oldDepth = ctxt->context->depth; + if (toBool) + return(xmlXPathCompOpEvalToBoolean(ctxt, + &comp->steps[comp->last], 0)); + else + xmlXPathCompOpEval(ctxt, &comp->steps[comp->last]); ++ ctxt->context->depth = oldDepth; + + return(0); + } +@@ -14218,6 +14219,7 @@ xmlXPathCompExprPtr + xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { + xmlXPathParserContextPtr pctxt; + xmlXPathCompExprPtr comp; ++ int oldDepth = 0; + + #ifdef XPATH_STREAMING + comp = xmlXPathTryStreamCompile(ctxt, str); +@@ -14231,8 +14233,10 @@ xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { + if (pctxt == NULL) + return NULL; + if (ctxt != NULL) +- ctxt->depth = 0; ++ oldDepth = ctxt->depth; + xmlXPathCompileExpr(pctxt, 1); ++ if (ctxt != NULL) ++ ctxt->depth = oldDepth; + + if( pctxt->error != XPATH_EXPRESSION_OK ) + { +@@ -14253,8 +14257,10 @@ xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { + comp = pctxt->comp; + if ((comp->nbStep > 1) && (comp->last >= 0)) { + if (ctxt != NULL) +- ctxt->depth = 0; ++ oldDepth = ctxt->depth; + xmlXPathOptimizeExpression(pctxt, &comp->steps[comp->last]); ++ if (ctxt != NULL) ++ ctxt->depth = oldDepth; + } + pctxt->comp = NULL; + } +@@ -14410,6 +14416,7 @@ xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) { + #ifdef XPATH_STREAMING + xmlXPathCompExprPtr comp; + #endif ++ int oldDepth = 0; + + if (ctxt == NULL) return; + +@@ -14423,8 +14430,10 @@ xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) { + #endif + { + if (ctxt->context != NULL) +- ctxt->context->depth = 0; ++ oldDepth = ctxt->context->depth; + xmlXPathCompileExpr(ctxt, 1); ++ if (ctxt->context != NULL) ++ ctxt->context->depth = oldDepth; + CHECK_ERROR; + + /* Check for trailing characters. */ +@@ -14433,9 +14442,11 @@ xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) { + + if ((ctxt->comp->nbStep > 1) && (ctxt->comp->last >= 0)) { + if (ctxt->context != NULL) +- ctxt->context->depth = 0; ++ oldDepth = ctxt->context->depth; + xmlXPathOptimizeExpression(ctxt, + &ctxt->comp->steps[ctxt->comp->last]); ++ if (ctxt->context != NULL) ++ ctxt->context->depth = oldDepth; + } + } + +-- +2.20.1 + diff --git a/backport-Use-xmlStrlen-in-CtxtReadDoc.patch b/backport-Use-xmlStrlen-in-CtxtReadDoc.patch new file mode 100644 index 0000000..7c91b94 --- /dev/null +++ b/backport-Use-xmlStrlen-in-CtxtReadDoc.patch @@ -0,0 +1,53 @@ +From 5b2d07a72670513e41b481a9d922c983a64027ca Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Sat, 20 Aug 2022 17:00:50 +0200 +Subject: [PATCH] Use xmlStrlen in *CtxtReadDoc + +xmlStrlen handles buffers larger than INT_MAX more gracefully. +--- + HTMLparser.c | 7 ++----- + parser.c | 6 ++---- + 2 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index aef82c02..975099ca 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -7116,13 +7116,10 @@ htmlDocPtr + htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur, + const char *URL, const char *encoding, int options) + { +- const char *buf; +- + if (cur == NULL) + return (NULL); +- buf = (const char *) cur; +- return (htmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding, +- options)); ++ return (htmlCtxtReadMemory(ctxt, (const char *) cur, xmlStrlen(cur), URL, ++ encoding, options)); + } + + /** +diff --git a/parser.c b/parser.c +index c313d88a..93f031be 100644 +--- a/parser.c ++++ b/parser.c +@@ -15359,12 +15359,10 @@ xmlDocPtr + xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur, + const char *URL, const char *encoding, int options) + { +- const char *buf; +- + if (cur == NULL) + return (NULL); +- buf = (const char *) cur; +- return (xmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding, options)); ++ return (xmlCtxtReadMemory(ctxt, (const char *) cur, xmlStrlen(cur), URL, ++ encoding, options)); + } + + /** +-- +2.20.1 + diff --git a/backport-Use-xmlStrlen-in-xmlNewStringInputStream.patch b/backport-Use-xmlStrlen-in-xmlNewStringInputStream.patch new file mode 100644 index 0000000..4e099c1 --- /dev/null +++ b/backport-Use-xmlStrlen-in-xmlNewStringInputStream.patch @@ -0,0 +1,26 @@ +From c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Sat, 20 Aug 2022 17:02:02 +0200 +Subject: [PATCH] Use xmlStrlen in xmlNewStringInputStream + +xmlStrlen handles buffers larger than INT_MAX more gracefully. +--- + parserInternals.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/parserInternals.c b/parserInternals.c +index 7dc06c88..c3a14ac0 100644 +--- a/parserInternals.c ++++ b/parserInternals.c +@@ -1356,7 +1356,7 @@ xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) { + xmlGenericError(xmlGenericErrorContext, + "new fixed input: %.30s\n", buffer); + buf = xmlParserInputBufferCreateMem((const char *) buffer, +- strlen((const char *) buffer), ++ xmlStrlen(buffer), + XML_CHAR_ENCODING_NONE); + if (buf == NULL) { + xmlErrMemory(ctxt, NULL); +-- +2.20.1 + diff --git a/libxml2.spec b/libxml2.spec index 22c3c4b..e15d5b2 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,7 +1,7 @@ Summary: Library providing XML and HTML support Name: libxml2 Version: 2.9.12 -Release: 11 +Release: 12 License: MIT Group: Development/Libraries Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz @@ -37,6 +37,15 @@ Patch27:backport-Don-t-reset-nsDef-when-changing-node-content.patch Patch28:backport-Avoid-double-free-if-malloc-fails-in-inputPush.patch Patch29:backport-Fix-memory-leak-in-xmlLoadEntityContent-error-path.patch Patch30:backport-Reset-nsNr-in-xmlCtxtReset.patch +Patch31:backport-Fix-htmlReadMemory-mixing-up-XML-and-HTML-functions.patch +Patch32:backport-Don-t-initialize-SAX-handler-in-htmlReadMemory.patch +Patch33:backport-Fix-HTML-parser-with-threads-and-without-legacy.patch +Patch34:backport-Fix-xmlCtxtReadDoc-with-encoding.patch +Patch35:backport-Use-xmlStrlen-in-CtxtReadDoc.patch +Patch36:backport-Create-stream-with-buffer-in-xmlNewStringInputStream.patch +Patch37:backport-Use-xmlStrlen-in-xmlNewStringInputStream.patch +Patch38:backport-Fix-memory-leak-with-invalid-XSD.patch +Patch39:backport-Make-XPath-depth-check-work-with-recursive-invocatio.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: python3-devel @@ -192,6 +201,12 @@ rm -fr %{buildroot} %changelog +* Mon Oct 10 2022 chenziyang - 2.9.12-12 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:backport patches from upstream + * Tue Sep 13 2022 fuanan - 2.9.12-11 - Fix Obsoletes in spec -- Gitee