mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
parser: Fix infinite loop with push parser in recovery mode
Short-lived regression from commit b1f9c193. Found by OSS-Fuzz.
This commit is contained in:
2
parser.c
2
parser.c
@@ -11836,7 +11836,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
size = XML_PARSER_BIG_BUFFER_SIZE;
|
size = XML_PARSER_BIG_BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
tmp = xmlCheckCdataPush(ctxt->input->cur, size, 0);
|
tmp = xmlCheckCdataPush(ctxt->input->cur, size, 0);
|
||||||
if (tmp < 0) {
|
if (tmp <= 0) {
|
||||||
tmp = -tmp;
|
tmp = -tmp;
|
||||||
ctxt->input->cur += tmp;
|
ctxt->input->cur += tmp;
|
||||||
goto encoding_error;
|
goto encoding_error;
|
||||||
|
|||||||
Reference in New Issue
Block a user