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:
2
xpath.c
2
xpath.c
@@ -14370,6 +14370,8 @@ xmlXPathCompiledEvalInternal(xmlXPathCompExprPtr comp,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
pctxt = xmlXPathCompParserContext(comp, ctxt);
|
pctxt = xmlXPathCompParserContext(comp, ctxt);
|
||||||
|
if (pctxt == NULL)
|
||||||
|
return(-1);
|
||||||
res = xmlXPathRunEval(pctxt, toBool);
|
res = xmlXPathRunEval(pctxt, toBool);
|
||||||
|
|
||||||
if (pctxt->error != XPATH_EXPRESSION_OK) {
|
if (pctxt->error != XPATH_EXPRESSION_OK) {
|
||||||
|
Reference in New Issue
Block a user