mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-11 05:17:37 +03:00
parser: Fix "Truncated multi-byte sequence" error
Don't raise the error if decoding failed.
This commit is contained in:
parent
02cbb2b64f
commit
0cde1b78d6
2
parser.c
2
parser.c
@ -10584,6 +10584,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
|
||||
xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
|
||||
} else if ((ctxt->input->buf != NULL) &&
|
||||
(ctxt->input->buf->encoder != NULL) &&
|
||||
(ctxt->input->buf->error == 0) &&
|
||||
(!xmlBufIsEmpty(ctxt->input->buf->raw))) {
|
||||
xmlFatalErrMsg(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Truncated multi-byte sequence at EOF\n");
|
||||
@ -11589,6 +11590,7 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
|
||||
}
|
||||
} else if ((ctxt->input->buf != NULL) &&
|
||||
(ctxt->input->buf->encoder != NULL) &&
|
||||
(ctxt->input->buf->error == 0) &&
|
||||
(!xmlBufIsEmpty(ctxt->input->buf->raw))) {
|
||||
xmlFatalErrMsg(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Truncated multi-byte sequence at EOF\n");
|
||||
|
Loading…
Reference in New Issue
Block a user