Re: [xml] crash in xmlSchemaFormatNodeForError when node is document


On Mon, 2005-11-07 at 08:08 -0500, Rob Richards wrote:
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.


OK, fixed in CVS now. The function will return an empty string now if
we give it a node of a type other than XML_ELEMENT_NODE or

Regards & thanks for the report!


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