After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591933 - segfault with -v and no LIBXSLT_PLUGINS_PATH in the environment
segfault with -v and no LIBXSLT_PLUGINS_PATH in the environment
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.x
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-16 02:07 UTC by Ben Walton
Modified: 2009-08-17 09:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to correct issue (tested on solaris 8 x86 only so far) (1.03 KB, patch)
2009-08-16 02:11 UTC, Ben Walton
none Details | Review
(updated) corrective patch (1.14 KB, patch)
2009-08-16 03:24 UTC, Ben Walton
none Details | Review

Description Ben Walton 2009-08-16 02:07:21 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.]
Comment 1 Ben Walton 2009-08-16 02:11:09 UTC
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.
Comment 2 Ben Walton 2009-08-16 03:24:09 UTC
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.
Comment 3 Daniel Veillard 2009-08-17 09:22:06 UTC
Okay, makes sense, applied and commited, 

  thanks

Daniel