1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

move current position before possible calling of ctxt->sax->characters.

This commit is contained in:
Yulin Li
2021-08-06 08:48:24 +00:00
committed by Nick Wellnhofer
parent 9675345048
commit 46c658b025

View File

@@ -4587,6 +4587,9 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
}
}
COPY_BUF(l,buf,nbchar,cur);
/* move current position before possible calling of ctxt->sax->characters */
NEXTL(l);
cur = CUR_CHAR(l);
if (nbchar >= XML_PARSER_BIG_BUFFER_SIZE) {
buf[nbchar] = 0;
@@ -4620,8 +4623,6 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
if (ctxt->instate == XML_PARSER_EOF)
return;
}
NEXTL(l);
cur = CUR_CHAR(l);
}
if (nbchar != 0) {
buf[nbchar] = 0;