mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-13 21:49:22 +03:00
malloc-fail: Report malloc failure in xmlXPathNumberFunction
This commit is contained in:
2
xpath.c
2
xpath.c
@ -8614,6 +8614,8 @@ xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
||||
valuePush(ctxt, xmlXPathCacheNewFloat(ctxt, 0.0));
|
||||
} else {
|
||||
xmlChar* content = xmlNodeGetContent(ctxt->context->node);
|
||||
if (content == NULL)
|
||||
xmlXPathPErrMemory(ctxt, NULL);
|
||||
|
||||
res = xmlXPathStringEvalNumber(content);
|
||||
valuePush(ctxt, xmlXPathCacheNewFloat(ctxt, res));
|
||||
|
Reference in New Issue
Block a user