GNOME Bugzilla – Bug 705400
Dereferenced before NULL check
Last modified: 2013-08-04 15:44:17 UTC
Created attachment 250764 [details] [review] Patch fixes dereferencing a pointer before NUll check In file : https://git.gnome.org/browse/libxml2/tree/SAX2.c Function : xmlSAX2StartDocument At line: 997 ctxt->myDoc is dereferenced while checked against NULL at line:999 If NULL is returned at line : 996 i.e ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL); then statements: ctxt->myDoc->properties = XML_DOC_HTML; ctxt->myDoc->parseFlags = ctxt->options; may lead to crash. Patch for fix is attached.
Indeed, whoops :-) Applied and pushed as commit a885f13a675d449e06529f9e68a6826acf45e19c thanks ! Daniel
Thanks Daniel. I have reported some dead code issues also, you are not committing them??