GNOME Bugzilla – Bug 735957
Null check needed in file libexslt/functions.c in function exsltFuncRegisterImportFunc after line no 114
Last modified: 2016-02-25 16:42:39 UTC
Version 1.1.28 File : libexslt/functions.c Line no 114 , exsltFuncNewFunctionData is returning NULL in case of failure scenario. Part of vesrion 1.1.28 code: if (func == NULL) { /* Not yet present - copy it in */ func = exsltFuncNewFunctionData(); memcpy(func, data, sizeof(exsltFuncFunctionData)); Memcpy may crash in case of func=NULL. So there shall be NULL check for func . Recommended code part: if (func == NULL) { /* Not yet present - copy it in */ func = exsltFuncNewFunctionData(); if (func == NULL) return; memcpy(func, data, sizeof(exsltFuncFunctionData)); I have attached patch for the fix for the failure scenario.
Created attachment 285238 [details] Recommended path for fix
Fixed with the following commit: https://git.gnome.org/browse/libxslt/commit/?id=fd675976f71264e1fbd84e048b9bb77386d95121
*** Bug 760250 has been marked as a duplicate of this bug. ***