1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-07 10:42:55 +03:00

Fix possible NULL pointer deref in libexslt/functions.c

Based on the patch by mahendra.n. Fixes bug #757663.

https://bugzilla.gnome.org/show_bug.cgi?id=757663
This commit is contained in:
Nick Wellnhofer
2015-12-13 19:22:48 +01:00
parent 66520a2cc0
commit c68b3f3d64

View File

@@ -303,6 +303,14 @@ exsltFuncFunctionFunction (xmlXPathParserContextPtr ctxt, int nargs) {
func = (exsltFuncFunctionData*) xmlHashLookup2 (data->funcs,
ctxt->context->functionURI,
ctxt->context->function);
if (func == NULL) {
/* Should never happen */
xsltGenericError(xsltGenericErrorContext,
"{%s}%s: not found\n",
ctxt->context->functionURI, ctxt->context->function);
ctxt->error = XPATH_UNKNOWN_FUNC_ERROR;
return;
}
/*
* params handling