1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Joe Marcus Clarke reported a segfault on FBsd this was due to

* valid.c: Joe Marcus Clarke reported a segfault on FBsd
  this was due to uninitialized parts of the validation context
Daniel
This commit is contained in:
Daniel Veillard
2002-10-09 10:20:30 +00:00
parent 321be0c5bf
commit 01992e0446
3 changed files with 24 additions and 8 deletions

View File

@ -1355,17 +1355,23 @@ xmlShellPrintXPathError(int errorType, const char *arg)
static void
xmlShellPrintNodeCtxt(xmlShellCtxtPtr ctxt,xmlNodePtr node)
{
if (!ctxt || !node)
FILE *fp;
if (!node)
return;
if (ctxt == NULL)
fp = stdout;
else
fp = ctxt->output;
if (node->type == XML_DOCUMENT_NODE)
xmlDocDump(ctxt->output, (xmlDocPtr) node);
xmlDocDump(fp, (xmlDocPtr) node);
else if (node->type == XML_ATTRIBUTE_NODE)
xmlDebugDumpAttrList(ctxt->output, (xmlAttrPtr) node, 0);
xmlDebugDumpAttrList(fp, (xmlAttrPtr) node, 0);
else
xmlElemDump(ctxt->output, node->doc, node);
xmlElemDump(fp, node->doc, node);
fprintf(ctxt->output, "\n");
fprintf(fp, "\n");
}
/**