GNOME Bugzilla – Bug 760250
Patch : null-pointer dereference possible in exsltFuncRegisterImportFunc
Last modified: 2016-02-25 16:42:39 UTC
Created attachment 318402 [details] [review] Patch file Version : 1.1.28 File : libexslt/functions.c Line No : 115 NULL check is missing on pointer before dereferencing it. In file libexslt/functions.c, pointer 'func' is dereferenced at line no 115, without NULL check. Current implementation : if (func == NULL) { /* Not yet present - copy it in */ func = exsltFuncNewFunctionData(); memcpy(func, data, sizeof(exsltFuncFunctionData)); Proposed implementation : if ((func == NULL) && (func = exsltFuncNewFunctionData())) { /* Not yet present - copy it in */ memcpy(func, data, sizeof(exsltFuncFunctionData)); if (xmlHashAddEntry2(ch->hash, URI, name, func) < 0) { Please find attached patch file (functions1.patch).
*** This bug has been marked as a duplicate of bug 735957 ***