GNOME Bugzilla – Bug 757663
Patch : Dereferencing a possible NULL pointer in functions.c
Last modified: 2015-12-13 19:37:17 UTC
Created attachment 314954 [details] [review] Patch file NULL check is missing on pointer before dereferencing it. File : functions.c Function : exsltFuncFunctionFunction Line no : 308 version : 1.1.28 Return value of a function 'xmlHashLookup2' is dereferenced at functions.c:308 without null checking Patch : Please check attached patch. --- functions_org.c 2015-11-06 10:21:40.707992184 +0530 +++ functions.c 2015-11-06 10:22:32.027993502 +0530 @@ -301,6 +301,12 @@ func = (exsltFuncFunctionData*) xmlHashLookup2 (data->funcs, ctxt->context->functionURI, ctxt->context->function); + if (func == NULL) { + xsltGenericError(xsltGenericErrorContext, + "{%s}%s: not found\n", + ctxt->context->functionURI, ctxt->context->function); + return; + } /* * params handling
Fixed in master: https://git.gnome.org/browse/libxslt/commit/?id=c68b3f3d64d52cc97e204d1fc039372bbb62dc6e