[LIBXML2] Update to version 2.9.12. CORE-17766

This commit is contained in:
Thomas Faber 2021-09-12 13:24:24 -04:00
parent 271556e6f8
commit 40ee59d609
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
60 changed files with 3385 additions and 2832 deletions

View file

@ -146,7 +146,7 @@ xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
* xmlParserPrintFileInfo:
* @input: an xmlParserInputPtr input
*
* Displays the associated file and line informations for the current input
* Displays the associated file and line information for the current input
*/
void
@ -557,6 +557,7 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
* of the usual "base" (doc->URL) for the node (bug 152623).
*/
xmlNodePtr prev = baseptr;
char *href = NULL;
int inclcount = 0;
while (prev != NULL) {
if (prev->prev == NULL)
@ -564,21 +565,20 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
else {
prev = prev->prev;
if (prev->type == XML_XINCLUDE_START) {
if (--inclcount < 0)
break;
if (inclcount > 0) {
--inclcount;
} else {
href = (char *) xmlGetProp(prev, BAD_CAST "href");
if (href != NULL)
break;
}
} else if (prev->type == XML_XINCLUDE_END)
inclcount++;
}
}
if (prev != NULL) {
if (prev->type == XML_XINCLUDE_START) {
prev->type = XML_ELEMENT_NODE;
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
prev->type = XML_XINCLUDE_START;
} else {
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
}
} else
if (href != NULL)
to->file = href;
else
#endif
to->file = (char *) xmlStrdup(baseptr->doc->URL);
if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) {
@ -643,7 +643,7 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
* @domain: where the error comes from
* @code: the error code
* @node: the context node
* @extra: extra informations
* @extra: extra information
*
* Handle an out of memory condition
*/