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 732823 - Fix various Missing Null checks
Fix various Missing Null checks
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-07 06:20 UTC by Gaurav
Modified: 2014-07-14 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix various Missing Null checks (1.66 KB, patch)
2014-07-07 06:20 UTC, Gaurav
none Details | Review

Description Gaurav 2014-07-07 06:20:46 UTC
Created attachment 280025 [details] [review]
Fix various Missing Null checks

The missing Null checks can cause Null Pointer dereference.

One more fix :
     int res;

     if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET) || (file == NULL)) return(-1);
-    if (file == NULL) return (0);

removed this line as file == NULL is checked in above line and return -1 as this is error case and not failed case.

Attached patch fixes some of these issues.
Comment 1 Daniel Veillard 2014-07-14 09:52:13 UTC
Okay I had to fix a few things including an error, but most of it
was right, pushed in get as 1811add768cabe36f763c960a40698418c5cbe47

  thanks !

Daniel