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:
@@ -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
|
||||
|
Reference in New Issue
Block a user