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 708355 - Pointer dereferenced before null check
Pointer dereferenced before null check
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: 2013-09-19 10:08 UTC by Gaurav
Modified: 2014-02-18 03:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Avoiding possible pointer dereference before NULL check. (511 bytes, patch)
2013-09-19 10:08 UTC, Gaurav
none Details | Review

Description Gaurav 2013-09-19 10:08:44 UTC
Created attachment 255281 [details] [review]
Avoiding possible pointer dereference before NULL check.

In file https://git.gnome.org/browse/libxml2/tree/xmlmodule.c
Funtion : xmlModuleSymbol(xmlModulePtr module, const char *name, void **symbol)

Pointer name is dereferenced in call:
 rc = xmlModulePlatformSymbol(module->handle, name, symbol);

But in next statement it is NULL checked.
So, If it is already NULL, then dereferencing NULL pointer may crash the code.


Attached Patched fixes the above situation.
Comment 1 Daniel Veillard 2014-02-18 03:49:41 UTC
Okay should be fixed in commit
  085b997cfd0cd19481d9eecab22da5adf67bcbdc

 thanks !

Daniel