[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

@ -105,7 +105,7 @@ xmlCheckVersion(int version) {
/**
* xmlErrMemory:
* @ctxt: an XML parser context
* @extra: extra informations
* @extra: extra information
*
* Handle a redefinition of attribute error
*/
@ -165,7 +165,7 @@ __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
* xmlErrInternal:
* @ctxt: an XML parser context
* @msg: the error message
* @str: error informations
* @str: error information
*
* Handle an internal error
*/
@ -519,8 +519,6 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
} else
/* 1-byte code */
ctxt->input->cur++;
ctxt->nbChars++;
} else {
/*
* Assume it's a fixed length encoding (1) with
@ -533,7 +531,6 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
} else
ctxt->input->col++;
ctxt->input->cur++;
ctxt->nbChars++;
}
if (*ctxt->input->cur == 0)
xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
@ -677,7 +674,6 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
}
if (*ctxt->input->cur == 0xD) {
if (ctxt->input->cur[1] == 0xA) {
ctxt->nbChars++;
ctxt->input->cur++;
}
return(0xA);
@ -693,7 +689,6 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
*len = 1;
if (*ctxt->input->cur == 0xD) {
if (ctxt->input->cur[1] == 0xA) {
ctxt->nbChars++;
ctxt->input->cur++;
}
return(0xA);
@ -1158,6 +1153,11 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
* Note: this is a bit dangerous, but that's what it
* takes to use nearly compatible signature for different
* encodings.
*
* FIXME: Encoders might buffer partial byte sequences, so
* this probably can't work. We should return an error and
* make sure that callers never try to switch the encoding
* twice.
*/
xmlCharEncCloseFunc(input->buf->encoder);
input->buf->encoder = handler;
@ -1748,7 +1748,6 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
ctxt->options |= XML_PARSE_NOENT;
}
ctxt->record_info = 0;
ctxt->nbChars = 0;
ctxt->checkIndex = 0;
ctxt->inSubset = 0;
ctxt->errNo = XML_ERR_OK;
@ -1877,7 +1876,7 @@ xmlNewParserCtxt(void)
/************************************************************************
* *
* Handling of node informations *
* Handling of node information *
* *
************************************************************************/