mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
parser: Fix progress check when parsing character data
Skip over zero bytes to guarantee progress. Short-lived regression.
This commit is contained in:
parent
234915361e
commit
a8b31e68c2
2
parser.c
2
parser.c
@ -4666,7 +4666,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((CUR != 0) && (!IS_CHAR(cur))) {
|
||||
if ((ctxt->input->cur < ctxt->input->end) && (!IS_CHAR(cur))) {
|
||||
/* Generate the error and skip the offending character */
|
||||
xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"PCDATA invalid Char value %d\n",
|
||||
|
@ -400,7 +400,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((*ctxt->input->cur == 0) &&
|
||||
if ((ctxt->input->cur >= ctxt->input->end) &&
|
||||
(xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user