Commit c68b3f3d authored by Nick Wellnhofer's avatar Nick Wellnhofer

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
parent 66520a2c
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment