[xml] crash in xmlSchemaFormatNodeForError when node is document



When validating with a schema against an empty document, xmlSchemaFormatNodeForError crashes because the document node, passed in from xmlSchemaValidateDoc, does not have node->ns and passes the if (node->ns != NULL) test resulting in a crash when node->ns->href is accessed for the error message.

Either a node type check needs to be added with the ns test or a case for a document node needs to be added to the xmlSchemaFormatNodeForError routine. Figure I would leave this up to Kasimier to decide if he wants to added specific error message for document or continue to handle it as an element.

Rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]