Commit 57560386 authored by Daniel Veillard's avatar Daniel Veillard

Cleanup URI module memory allocation code

* uri.c: cleanup the code doing the allocations, set up a structured
  error handler to report memory errors, and set up an abitrary
  limit on URI saving size
* error.c include/libxml/xmlerror.h: add a new FROM_URI indication
  for structured error reporting, also adding strings for schematron
  and buffer which were missing
parent 747c2c10
......@@ -360,6 +360,15 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
case XML_FROM_I18N:
channel(data, "encoding ");
break;
case XML_FROM_SCHEMATRONV:
channel(data, "schematron ");
break;
case XML_FROM_BUFFER:
channel(data, "internal buffer ");
break;
case XML_FROM_URI:
channel(data, "URI ");
break;
default:
break;
}
......
......@@ -63,7 +63,8 @@ typedef enum {
XML_FROM_MODULE, /* The dynamically loaded module module*/
XML_FROM_I18N, /* The module handling character conversion */
XML_FROM_SCHEMATRONV,/* The Schematron validator module */
XML_FROM_BUFFER /* The buffers module */
XML_FROM_BUFFER, /* The buffers module */
XML_FROM_URI /* The URI module */
} xmlErrorDomain;
/**
......
This diff is collapsed.
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