1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

malloc-fail: Fix null deref in xmlXPathCompiledEvalInternal

Found with libFuzzer, see #344.
This commit is contained in:
Nick Wellnhofer
2023-02-26 14:33:16 +01:00
parent 0f112d0289
commit 70b21c9f2a

View File

@@ -14370,6 +14370,8 @@ xmlXPathCompiledEvalInternal(xmlXPathCompExprPtr comp,
}
#endif
pctxt = xmlXPathCompParserContext(comp, ctxt);
if (pctxt == NULL)
return(-1);
res = xmlXPathRunEval(pctxt, toBool);
if (pctxt->error != XPATH_EXPRESSION_OK) {