Commit 1f5c9891 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

xmlValidateElement could crash for element holding a namespace declaration

* valid.c: xmlValidateElement could crash for element holding a
  namespace declaration but not in a namespace. Oliver Fischer
  provided the example.
Daniel
parent d21f61b5
Mon Dec 29 18:08:05 CET 2003 Daniel Veillard <daniel@veillard.com>
* valid.c: xmlValidateElement could crash for element holding a
namespace declaration but not in a namespace. Oliver Fischer
provided the example.
Mon Dec 29 11:29:31 CET 2003 Daniel Veillard <daniel@veillard.com>
 
* xmllint.c: issue validation status on stderr, not stdout as suggested
......
......@@ -6095,8 +6095,12 @@ xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
}
ns = elem->nsDef;
while (ns != NULL) {
ret &= xmlValidateOneNamespace(ctxt, doc, elem, elem->ns->prefix,
ns, ns->href);
if (elem->ns == NULL)
ret &= xmlValidateOneNamespace(ctxt, doc, elem, NULL,
ns, ns->href);
else
ret &= xmlValidateOneNamespace(ctxt, doc, elem, elem->ns->prefix,
ns, ns->href);
ns = ns->next;
}
child = elem->children;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment