1
0
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:
Nick Wellnhofer
2022-12-25 21:26:17 +01:00
parent 49b54d7e2b
commit 66e9fd66e8

View File

@@ -11836,7 +11836,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
size = XML_PARSER_BIG_BUFFER_SIZE;
}
tmp = xmlCheckCdataPush(ctxt->input->cur, size, 0);
if (tmp < 0) {
if (tmp <= 0) {
tmp = -tmp;
ctxt->input->cur += tmp;
goto encoding_error;