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 760113 - patch : Unreachable code correction in transform.c
patch : Unreachable code correction in transform.c
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.x
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-04 06:25 UTC by mahendra.n
Modified: 2016-07-13 11:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch file (339 bytes, patch)
2016-01-04 06:25 UTC, mahendra.n
none Details | Review

Description mahendra.n 2016-01-04 06:25:51 UTC
Created attachment 318200 [details] [review]
Patch file

Unreachable code at line no 692
File : transform.c
Function : xsltAddChild
Line no : 692
version : 1.1.28

In file transform.c, NULL check at line no 689 causing statement at line no 692 unreachable.

Original source code :
   if ((cur == NULL) || (parent == NULL))
       return(NULL);
   if (parent == NULL) {
       xmlFreeNode(cur);
       return(NULL);
   }

Modified source code :
   if (cur == NULL)
       return(NULL);
   if (parent == NULL) {
       xmlFreeNode(cur);
       return(NULL);
   }


Please find attached patch file(transform2.patch).
Comment 1 Nick Wellnhofer 2016-07-13 11:20:30 UTC
Fixed with the following commit:

https://git.gnome.org/browse/libxslt/commit/?id=ca99e1d41f970d8499b3cb0faf36282c064cabfa