GNOME Bugzilla – Bug 733040
Fix Null Pointer Dereference
Last modified: 2014-07-14 08:41:15 UTC
Created attachment 280463 [details] [review] Fix Possible Null Pointer dereference. In file parser.c : 9316 const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len); 9317 xmlURIPtr uri; 9318 9319 if (*URL != 0) { In above code, if URL is NUll then if condition is doing NUll check. But *URL is de-referencing URL which may crash. Please apply attached patch.
The error condition is right, xmlDictLookup() should never return numm but may do so in case of allocation error. But the test need to be maintained we are checking for an enpty string there i.e. xmlns="" which is perfectly legal. I commited a fix c836ba66e57d4d9f90f1dc7a827625c99622408f in git, thanks for the report ! Daniel