Re: [xml] crash in xmlSchemaFormatNodeForError when node is document
- From: Kasimier Buchcik <K Buchcik 4commerce de>
- To: Rob Richards <rrichards ctindustries net>
- Cc: ML-libxml2 <xml gnome org>
- Subject: Re: [xml] crash in xmlSchemaFormatNodeForError when node is document
- Date: Mon, 07 Nov 2005 15:06:53 +0100
Hi,
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.
Rob
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
XML_ATTRIBUTE_NODE.
Regards & thanks for the report!
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]