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 757617 - Patch : Dereferencing a possible NULL pointer
Patch : Dereferencing a possible NULL pointer
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.x
Other Linux
: Normal major
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-05 04:12 UTC by mahendra.n
Modified: 2015-12-13 19:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch file (313 bytes, patch)
2015-11-05 04:12 UTC, mahendra.n
none Details | Review

Description mahendra.n 2015-11-05 04:12:32 UTC
Created attachment 314866 [details] [review]
patch file

NULL check is missing on pointer before dereferencing it.
File : preproc.c
Function : xsltGetQNameProperty
Line no : 1304
version : 1.1.28

In file preproc.c pointer ‘localName' is dereferenced at line no 1304, without NULL check. 
As per current implementation ‘localName’ can be NULL as NULL check is applied at line no 1274

Patch :

@@ -1301,7 +1301,8 @@
            if (prop == NULL) {
                style->errors++;
            } else {
-               *localName = prop;
+               if (localName)
+                   *localName = prop;
                if (hasProp)
                    *hasProp = 1;
                if (URI != NULL) {

Please check attached patch to fix this issue.