GNOME Bugzilla – Bug 708364
Pointer dereferenced before null check (valid.c)
Last modified: 2013-09-30 02:46:50 UTC
Created attachment 255296 [details] [review] Fixing possible Pointer Dereference before NULL check. In file https://git.gnome.org/browse/libxml2/tree/valid.c In function: xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child, xmlElementPtr elemDecl, int warn, xmlNodePtr parent) variable ctxt is derefernced at many instances before null check at line no:5439 if (ctxt != NULL) { ----- So, if ctxt is NULL before this check, dereferencing it may cause crash. Attached patch fixes this.
Applied and puhed: https://git.gnome.org/browse/libxml2/commit/?id=c570b37972b364d03605a0c67b8497bc4b3227af thanks ! Daniel