GNOME Bugzilla – Bug 591933
segfault with -v and no LIBXSLT_PLUGINS_PATH in the environment
Last modified: 2009-08-17 09:22:06 UTC
When -v is specified and there is no LIBXSLT_PLUGINS_PATH set in the environment, a segfault can be triggered due to a NULL pointer dereference in the debug call from xsltExtModuleRegisterDynamic. I've attached a patch that addresses the issue by only calling the debug function after the variable has been validated. I found this on solaris, but it's broadly applicable. [This applies to 1.1.24 (not available from the Version selector). I didn't look at older versions.]
Created attachment 140862 [details] [review] Patch to correct issue (tested on solaris 8 x86 only so far) ...for some reason this didn't get attached with my original submission. I can't tick of 'patch' and submit at the same time.
Created attachment 140864 [details] [review] (updated) corrective patch I believe this patch is better since it more closely honours the intent of the original code. The debug statement will only happen if the environment variable is set, avoiding the segfault, but won't happen if the ext_directory variable is set using the default. The code builds with this patch, but I haven't tested it.
Okay, makes sense, applied and commited, thanks Daniel