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 760143 - Patch : Redundant NULL check in preproc.c
Patch : Redundant NULL check in preproc.c
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: 2016-01-05 06:23 UTC by mahendra.n
Modified: 2016-07-13 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch file (2.79 KB, patch)
2016-01-05 06:23 UTC, mahendra.n
none Details | Review

Description mahendra.n 2016-01-05 06:23:28 UTC
Created attachment 318236 [details] [review]
Patch file

Version 1.1.28
File : libexslt/preproc.c

In function xsltNumberComp at line no 1416, NULL check is applied on "style" and "cur".

statement "if ((style == NULL) || (cur == NULL))"  is always true at line no 1416 because NULL check is already applied on style and cur in same function at line no 1403 and if style or cur is NULL, function will return at line no 1404.

So style or cur can not be NULL at line no 1416.

There are similar incidences in function xsltIfComp, xsltWhenComp and xsltForEachComp.


Please check attached patch file(preproc1.patch) to remove redundant NULL checks.
Comment 1 Nick Wellnhofer 2016-07-13 11:21:07 UTC
Fixed with the following commit:

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