diff -Nru libxml2-2.9.3+dfsg1/debian/changelog libxml2-2.9.3+dfsg1/debian/changelog --- libxml2-2.9.3+dfsg1/debian/changelog 2016-06-03 12:22:49.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/changelog 2017-03-14 22:04:41.000000000 +0000 @@ -1,3 +1,33 @@ +libxml2 (2.9.3+dfsg1-1ubuntu0.2) xenial-security; urgency=medium + + * SECURITY UPDATE: format string vulnerabilities + - debian/patches/CVE-2016-4448-1.patch: fix format string warnings in + HTMLparser.c, SAX2.c, catalog.c, configure.ac, debugXML.c, + encoding.c, entities.c, error.c, include/libxml/parserInternals.h, + include/libxml/xmlerror.h, include/libxml/xmlstring.h, libxml.h, + parser.c, parserInternals.c, relaxng.c, schematron.c, testModule.c, + valid.c, xinclude.c, xmlIO.c, xmllint.c, xmlreader.c, xmlschemas.c, + xmlstring.c, xmlwriter.c, xpath.c, xpointer.c. + - debian/patches/CVE-2016-4448-2.patch: fix format string warnings in + libxml.h, relaxng.c, xmlschemas.c, xmlstring.c. + - debian/libxml2.symbols: added new symbol. + - CVE-2016-4448 + * SECURITY UPDATE: use-after-free via namespace nodes in XPointer ranges + - debian/patches/CVE-2016-4658.patch: disallow namespace nodes in + XPointer ranges in xpointer.c. + - CVE-2016-4658 + * SECURITY UPDATE: use-after-free in XPointer range-to function + - debian/patches/CVE-2016-5131-1.patch: fix XPointer paths beginning + with range-to in xpath.c, xpointer.c. + - debian/patches/CVE-2016-5131-2.patch: fix comparison with root node + in xmlXPathCmpNodes in xpath.c. + - CVE-2016-5131 + * debian/patches/lp1652325.patch: XML push parser fails with bogus + UTF-8 encoding error when multi-byte character in large CDATA section + is split across buffer (LP: #1652325) + + -- Marc Deslauriers Tue, 14 Mar 2017 16:06:13 -0400 + libxml2 (2.9.3+dfsg1-1ubuntu0.1) xenial-security; urgency=medium * SECURITY UPDATE: heap-based buffer overread in xmlNextChar diff -Nru libxml2-2.9.3+dfsg1/debian/libxml2.symbols libxml2-2.9.3+dfsg1/debian/libxml2.symbols --- libxml2-2.9.3+dfsg1/debian/libxml2.symbols 2015-12-14 07:52:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/libxml2.symbols 2017-03-14 22:04:23.000000000 +0000 @@ -143,6 +143,7 @@ xmlDictGetUsage@LIBXML2_2.9.0 2.9.0 xmlDictSetLimit@LIBXML2_2.9.0 2.9.0 xmlEncodeAttributeEntities@Base 2.9.0 + xmlEscapeFormatString@Base 2.9.3+dfsg1-1ubuntu0.2 xmlGenericErrorDefaultFunc@Base 2.6.27 xmlInitializeDict@LIBXML2_2.8.0 2.8.0 xmlMallocBreakpoint@Base 2.6.27 diff -Nru libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-1.patch libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-1.patch --- libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-1.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-1.patch 2017-03-14 20:05:20.000000000 +0000 @@ -0,0 +1,1065 @@ +From 4472c3a5a5b516aaf59b89be602fbce52756c3e9 Mon Sep 17 00:00:00 2001 +From: David Kilzer +Date: Fri, 13 May 2016 15:13:17 +0800 +Subject: Fix some format string warnings with possible format string + vulnerability + +For https://bugzilla.gnome.org/show_bug.cgi?id=761029 + +Decorate every method in libxml2 with the appropriate +LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups +following the reports. +--- + HTMLparser.c | 4 +-- + SAX2.c | 12 ++++---- + catalog.c | 2 +- + configure.ac | 4 +-- + debugXML.c | 4 +-- + encoding.c | 2 +- + entities.c | 2 +- + error.c | 2 +- + include/libxml/parserInternals.h | 2 +- + include/libxml/xmlerror.h | 2 +- + include/libxml/xmlstring.h | 8 ++--- + libxml.h | 2 +- + parser.c | 37 +++++++++++----------- + parserInternals.c | 4 +-- + relaxng.c | 4 +-- + schematron.c | 2 +- + testModule.c | 2 +- + valid.c | 8 ++--- + xinclude.c | 4 +-- + xmlIO.c | 14 ++++----- + xmllint.c | 20 ++++++------ + xmlreader.c | 16 +++++++--- + xmlschemas.c | 66 ++++++++++++++++++++-------------------- + xmlstring.c | 4 +-- + xmlwriter.c | 4 +-- + xpath.c | 2 +- + xpointer.c | 2 +- + 27 files changed, 121 insertions(+), 114 deletions(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index c6fcbc9..0985d1d 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -105,7 +105,7 @@ htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra) + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, const xmlChar *str2) + { +@@ -132,7 +132,7 @@ htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, int val) + { +diff --git a/SAX2.c b/SAX2.c +index ffef3e1..5cbb700 100644 +--- a/SAX2.c ++++ b/SAX2.c +@@ -55,7 +55,7 @@ + * @ctxt: an XML validation parser context + * @msg: a string to accompany the error message + */ +-static void ++static void LIBXML_ATTR_FORMAT(2,0) + xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) { + xmlStructuredErrorFunc schannel = NULL; + const char *str1 = "out of memory\n"; +@@ -93,7 +93,7 @@ xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) { + * + * Handle a validation error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const char *str1, const char *str2) + { +@@ -133,7 +133,7 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, const xmlChar *str2) + { +@@ -164,7 +164,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a parser warning + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1) + { +@@ -189,7 +189,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a namespace error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, const xmlChar *str2) + { +@@ -213,7 +213,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a namespace warning + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, const xmlChar *str2) + { +diff --git a/catalog.c b/catalog.c +index ac6e981..6dfdfbb 100644 +--- a/catalog.c ++++ b/catalog.c +@@ -238,7 +238,7 @@ xmlCatalogErrMemory(const char *extra) + * + * Handle a catalog error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error, + const char *msg, const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3) +diff --git a/configure.ac b/configure.ac +index 5ffa01f..911984e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -791,7 +791,7 @@ else + fi + + # warnings we'd like to see +- CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" ++ CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" + # warnings we'd like to supress + CFLAGS="${CFLAGS} -Wno-long-long" + case "${host}" in +@@ -1010,7 +1010,7 @@ if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \ + fi + fi + if test "${GCC}" = "yes" ; then +- CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" ++ CFLAGS="-g -O -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" + fi + STATIC_BINARIES="-static" + dnl -Wcast-qual -ansi +diff --git a/debugXML.c b/debugXML.c +index e34b140..a1b550a 100644 +--- a/debugXML.c ++++ b/debugXML.c +@@ -164,7 +164,7 @@ xmlDebugErr(xmlDebugCtxtPtr ctxt, int error, const char *msg) + NULL, NULL, NULL, 0, 0, + "%s", msg); + } +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra) + { + ctxt->errors++; +@@ -174,7 +174,7 @@ xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra) + NULL, NULL, NULL, 0, 0, + msg, extra); + } +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlDebugErr3(xmlDebugCtxtPtr ctxt, int error, const char *msg, const char *extra) + { + ctxt->errors++; +diff --git a/encoding.c b/encoding.c +index 574e1ae..e49c7f8 100644 +--- a/encoding.c ++++ b/encoding.c +@@ -93,7 +93,7 @@ xmlEncodingErrMemory(const char *extra) + * + * n encoding error + */ +-static void ++static void LIBXML_ATTR_FORMAT(2,0) + xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val) + { + __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, +diff --git a/entities.c b/entities.c +index a72afb3..64808ff 100644 +--- a/entities.c ++++ b/entities.c +@@ -83,7 +83,7 @@ xmlEntitiesErrMemory(const char *extra) + * + * Handle an out of memory condition + */ +-static void ++static void LIBXML_ATTR_FORMAT(2,0) + xmlEntitiesErr(xmlParserErrors code, const char *msg) + { + __xmlSimpleError(XML_FROM_TREE, code, NULL, msg, NULL); +diff --git a/error.c b/error.c +index 4ca6838..9606f13 100644 +--- a/error.c ++++ b/error.c +@@ -18,7 +18,7 @@ + + void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, + const char *msg, +- ...); ++ ...) LIBXML_ATTR_FORMAT(2,3); + + #define XML_GET_VAR_STR(msg, str) { \ + int size, prev_size = -1; \ +diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h +index 6065320..f30fc68 100644 +--- a/include/libxml/parserInternals.h ++++ b/include/libxml/parserInternals.h +@@ -351,7 +351,7 @@ XMLPUBFUN void XMLCALL + xmlParserErrors xmlerr, + const char *msg, + const xmlChar * str1, +- const xmlChar * str2); ++ const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0); + #endif + + /** +diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h +index 43e68ca..037c16d 100644 +--- a/include/libxml/xmlerror.h ++++ b/include/libxml/xmlerror.h +@@ -937,7 +937,7 @@ XMLPUBFUN void XMLCALL + int code, + xmlNodePtr node, + const char *msg, +- const char *extra); ++ const char *extra) LIBXML_ATTR_FORMAT(4,0); + #endif + #ifdef __cplusplus + } +diff --git a/include/libxml/xmlstring.h b/include/libxml/xmlstring.h +index 2036236..2d0b2d1 100644 +--- a/include/libxml/xmlstring.h ++++ b/include/libxml/xmlstring.h +@@ -97,13 +97,13 @@ XMLPUBFUN xmlChar * XMLCALL + XMLPUBFUN int XMLCALL + xmlStrPrintf (xmlChar *buf, + int len, +- const xmlChar *msg, +- ...); ++ const char *msg, ++ ...) LIBXML_ATTR_FORMAT(3,4); + XMLPUBFUN int XMLCALL + xmlStrVPrintf (xmlChar *buf, + int len, +- const xmlChar *msg, +- va_list ap); ++ const char *msg, ++ va_list ap) LIBXML_ATTR_FORMAT(3,0); + + XMLPUBFUN int XMLCALL + xmlGetUTF8Char (const unsigned char *utf, +diff --git a/libxml.h b/libxml.h +index 2da9044..4558b70 100644 +--- a/libxml.h ++++ b/libxml.h +@@ -68,7 +68,7 @@ extern int __xmlRegisterCallbacks; + * internal error reporting routines, shared but not partof the API. + */ + void __xmlIOErr(int domain, int code, const char *extra); +-void __xmlLoaderErr(void *ctx, const char *msg, const char *filename); ++void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0); + #ifdef LIBXML_HTML_ENABLED + /* + * internal function of HTML parser needed for xmlParseInNodeContext +diff --git a/parser.c b/parser.c +index f6d652e..15c606f 100644 +--- a/parser.c ++++ b/parser.c +@@ -346,7 +346,6 @@ static void + xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info) + { + const char *errmsg; +- char errstr[129] = ""; + + if ((ctxt != NULL) && (ctxt->disableSAX != 0) && + (ctxt->instate == XML_PARSER_EOF)) +@@ -533,15 +532,17 @@ xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info) + default: + errmsg = "Unregistered error message"; + } +- if (info == NULL) +- snprintf(errstr, 128, "%s\n", errmsg); +- else +- snprintf(errstr, 128, "%s: %%s\n", errmsg); + if (ctxt != NULL) + ctxt->errNo = error; +- __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, +- XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, &errstr[0], +- info); ++ if (info == NULL) { ++ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, ++ XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, "%s\n", ++ errmsg); ++ } else { ++ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, ++ XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, "%s: %s\n", ++ errmsg, info); ++ } + if (ctxt != NULL) { + ctxt->wellFormed = 0; + if (ctxt->recovery == 0) +@@ -557,7 +558,7 @@ xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info) + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg) + { +@@ -585,7 +586,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a warning. + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, const xmlChar *str2) + { +@@ -623,7 +624,7 @@ xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a validity error. + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, const xmlChar *str2) + { +@@ -663,7 +664,7 @@ xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlFatalErrMsgInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, int val) + { +@@ -693,7 +694,7 @@ xmlFatalErrMsgInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlFatalErrMsgStrIntStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar *str1, int val, + const xmlChar *str2) +@@ -723,7 +724,7 @@ xmlFatalErrMsgStrIntStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlFatalErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar * val) + { +@@ -752,7 +753,7 @@ xmlFatalErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a non fatal parser error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const xmlChar * val) + { +@@ -777,7 +778,7 @@ xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a fatal parser error, i.e. violating Well-Formedness constraints + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlNsErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, + const xmlChar * info1, const xmlChar * info2, +@@ -806,7 +807,7 @@ xmlNsErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a namespace warning error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, + const xmlChar * info1, const xmlChar * info2, +@@ -5522,7 +5523,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { + skipped = SKIP_BLANKS; + if (skipped == 0) { + xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, +- "Space required after '%'\n"); ++ "Space required after '%%'\n"); + } + isParameter = 1; + } +diff --git a/parserInternals.c b/parserInternals.c +index 6c3995c..8c79678 100644 +--- a/parserInternals.c ++++ b/parserInternals.c +@@ -165,7 +165,7 @@ __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr, + * + * Handle an internal error + */ +-static void ++static void LIBXML_ATTR_FORMAT(2,0) + xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str) + { + if ((ctxt != NULL) && (ctxt->disableSAX != 0) && +@@ -193,7 +193,7 @@ xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str) + * + * n encoding error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlErrEncodingInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, + const char *msg, int val) + { +diff --git a/relaxng.c b/relaxng.c +index 5779e7f..345f354 100644 +--- a/relaxng.c ++++ b/relaxng.c +@@ -507,7 +507,7 @@ xmlRngVErrMemory(xmlRelaxNGValidCtxtPtr ctxt, const char *extra) + * + * Handle a Relax NG Parsing error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error, + const char *msg, const xmlChar * str1, const xmlChar * str2) + { +@@ -541,7 +541,7 @@ xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error, + * + * Handle a Relax NG Validation error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error, + const char *msg, const xmlChar * str1, const xmlChar * str2) + { +diff --git a/schematron.c b/schematron.c +index 458984f..6200f2d 100644 +--- a/schematron.c ++++ b/schematron.c +@@ -245,7 +245,7 @@ xmlSchematronPErrMemory(xmlSchematronParserCtxtPtr ctxt, + * + * Handle a parser error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlSchematronPErr(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr node, int error, + const char *msg, const xmlChar * str1, const xmlChar * str2) + { +diff --git a/testModule.c b/testModule.c +index e399f5c..77b7ba1 100644 +--- a/testModule.c ++++ b/testModule.c +@@ -47,7 +47,7 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { + + /* build the module filename, and confirm the module exists */ + xmlStrPrintf(filename, sizeof(filename), +- (const xmlChar*) "%s/testdso%s", ++ "%s/testdso%s", + (const xmlChar*)MODULE_PATH, + (const xmlChar*)LIBXML_MODULE_EXTENSION); + +diff --git a/valid.c b/valid.c +index 6567f15..19f84b8 100644 +--- a/valid.c ++++ b/valid.c +@@ -93,7 +93,7 @@ xmlVErrMemory(xmlValidCtxtPtr ctxt, const char *extra) + * + * Handle a validation error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error, + const char *msg, const char *extra) + { +@@ -137,7 +137,7 @@ xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error, + * + * Handle a validation error, provide contextual informations + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlErrValidNode(xmlValidCtxtPtr ctxt, + xmlNodePtr node, xmlParserErrors error, + const char *msg, const xmlChar * str1, +@@ -180,7 +180,7 @@ xmlErrValidNode(xmlValidCtxtPtr ctxt, + * + * Handle a validation error, provide contextual informations + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlErrValidNodeNr(xmlValidCtxtPtr ctxt, + xmlNodePtr node, xmlParserErrors error, + const char *msg, const xmlChar * str1, +@@ -221,7 +221,7 @@ xmlErrValidNodeNr(xmlValidCtxtPtr ctxt, + * + * Handle a validation error, provide contextual information + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlErrValidWarning(xmlValidCtxtPtr ctxt, + xmlNodePtr node, xmlParserErrors error, + const char *msg, const xmlChar * str1, +diff --git a/xinclude.c b/xinclude.c +index ff3dafb..e3bb43e 100644 +--- a/xinclude.c ++++ b/xinclude.c +@@ -125,7 +125,7 @@ xmlXIncludeErrMemory(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, + * + * Handle an XInclude error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error, + const char *msg, const xmlChar *extra) + { +@@ -147,7 +147,7 @@ xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error, + * + * Emit an XInclude warning. + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlXIncludeWarn(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error, + const char *msg, const xmlChar *extra) + { +diff --git a/xmlIO.c b/xmlIO.c +index 8b13184..1a79c09 100644 +--- a/xmlIO.c ++++ b/xmlIO.c +@@ -1604,7 +1604,7 @@ xmlCreateZMemBuff( int compression ) { + xmlFreeZMemBuff( buff ); + buff = NULL; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlCreateZMemBuff: %s %d\n", ++ "xmlCreateZMemBuff: %s %d\n", + "Error initializing compression context. ZLIB error:", + z_err ); + xmlIOErr(XML_IO_WRITE, (const char *) msg); +@@ -1672,7 +1672,7 @@ xmlZMemBuffExtend( xmlZMemBuffPtr buff, size_t ext_amt ) { + else { + xmlChar msg[500]; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlZMemBuffExtend: %s %lu bytes.\n", ++ "xmlZMemBuffExtend: %s %lu bytes.\n", + "Allocation failure extending output buffer to", + new_size ); + xmlIOErr(XML_IO_WRITE, (const char *) msg); +@@ -1718,7 +1718,7 @@ xmlZMemBuffAppend( xmlZMemBuffPtr buff, const char * src, int len ) { + if ( z_err != Z_OK ) { + xmlChar msg[500]; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlZMemBuffAppend: %s %d %s - %d", ++ "xmlZMemBuffAppend: %s %d %s - %d", + "Compression error while appending", + len, "bytes to buffer. ZLIB error", z_err ); + xmlIOErr(XML_IO_WRITE, (const char *) msg); +@@ -1791,7 +1791,7 @@ xmlZMemBuffGetContent( xmlZMemBuffPtr buff, char ** data_ref ) { + else { + xmlChar msg[500]; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlZMemBuffGetContent: %s - %d\n", ++ "xmlZMemBuffGetContent: %s - %d\n", + "Error flushing zlib buffers. Error code", z_err ); + xmlIOErr(XML_IO_WRITE, (const char *) msg); + } +@@ -1996,7 +1996,7 @@ xmlIOHTTPWrite( void * context, const char * buffer, int len ) { + if ( len < 0 ) { + xmlChar msg[500]; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlIOHTTPWrite: %s\n%s '%s'.\n", ++ "xmlIOHTTPWrite: %s\n%s '%s'.\n", + "Error appending to internal buffer.", + "Error sending document to URI", + ctxt->uri ); +@@ -2068,7 +2068,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) { + if ( http_content == NULL ) { + xmlChar msg[500]; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlIOHTTPCloseWrite: %s '%s' %s '%s'.\n", ++ "xmlIOHTTPCloseWrite: %s '%s' %s '%s'.\n", + "Error retrieving content.\nUnable to", + http_mthd, "data to URI", ctxt->uri ); + xmlIOErr(XML_IO_WRITE, (const char *) msg); +@@ -2140,7 +2140,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) { + else { + xmlChar msg[500]; + xmlStrPrintf(msg, 500, +- (const xmlChar *) "xmlIOHTTPCloseWrite: HTTP '%s' of %d %s\n'%s' %s %d\n", ++ "xmlIOHTTPCloseWrite: HTTP '%s' of %d %s\n'%s' %s %d\n", + http_mthd, content_lgth, + "bytes to URI", ctxt->uri, + "failed. HTTP return code:", http_rtn ); +diff --git a/xmllint.c b/xmllint.c +index 00f1769..67f7adb 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -449,7 +449,7 @@ startTimer(void) + * message about the timing performed; format is a printf + * type argument + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(1,2) + endTimer(const char *fmt, ...) + { + long msec; +@@ -485,7 +485,7 @@ startTimer(void) + { + begin = clock(); + } +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(1,2) + endTimer(const char *fmt, ...) + { + long msec; +@@ -514,7 +514,7 @@ startTimer(void) + * Do nothing + */ + } +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(1,2) + endTimer(char *format, ...) + { + /* +@@ -634,7 +634,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) { + * Display and format an error messages, gives file, line, position and + * extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + xmlHTMLError(void *ctx, const char *msg, ...) + { + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; +@@ -671,7 +671,7 @@ xmlHTMLError(void *ctx, const char *msg, ...) + * Display and format a warning messages, gives file, line, position and + * extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + xmlHTMLWarning(void *ctx, const char *msg, ...) + { + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; +@@ -709,7 +709,7 @@ xmlHTMLWarning(void *ctx, const char *msg, ...) + * Display and format an validity error messages, gives file, + * line, position and extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + xmlHTMLValidityError(void *ctx, const char *msg, ...) + { + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; +@@ -746,7 +746,7 @@ xmlHTMLValidityError(void *ctx, const char *msg, ...) + * Display and format a validity warning messages, gives file, line, + * position and extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + xmlHTMLValidityWarning(void *ctx, const char *msg, ...) + { + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; +@@ -1411,7 +1411,7 @@ commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value) + * Display and format a warning messages, gives file, line, position and + * extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) + { + va_list args; +@@ -1434,7 +1434,7 @@ warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) + * Display and format a error messages, gives file, line, position and + * extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) + { + va_list args; +@@ -1457,7 +1457,7 @@ errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) + * Display and format a fatalError messages, gives file, line, position and + * extra parameters. + */ +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) + { + va_list args; +diff --git a/xmlreader.c b/xmlreader.c +index d416dac..f285790 100644 +--- a/xmlreader.c ++++ b/xmlreader.c +@@ -4050,13 +4050,19 @@ xmlTextReaderCurrentDoc(xmlTextReaderPtr reader) { + } + + #ifdef LIBXML_SCHEMAS_ENABLED +-static char *xmlTextReaderBuildMessage(const char *msg, va_list ap); ++static char *xmlTextReaderBuildMessage(const char *msg, va_list ap) LIBXML_ATTR_FORMAT(1,0); + + static void XMLCDECL +-xmlTextReaderValidityError(void *ctxt, const char *msg, ...); ++xmlTextReaderValidityError(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); + + static void XMLCDECL +-xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...); ++xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); ++ ++static void XMLCDECL ++xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); ++ ++static void XMLCDECL ++xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); + + static void XMLCDECL + xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) +@@ -4850,7 +4856,7 @@ xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error) + } + } + +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + xmlTextReaderError(void *ctxt, const char *msg, ...) + { + va_list ap; +@@ -4863,7 +4869,7 @@ xmlTextReaderError(void *ctxt, const char *msg, ...) + + } + +-static void XMLCDECL ++static void XMLCDECL LIBXML_ATTR_FORMAT(2,3) + xmlTextReaderWarning(void *ctxt, const char *msg, ...) + { + va_list ap; +diff --git a/xmlschemas.c b/xmlschemas.c +index ee22a6d..76f2119 100644 +--- a/xmlschemas.c ++++ b/xmlschemas.c +@@ -1085,7 +1085,7 @@ xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type); + static void + xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt, + const char *funcName, +- const char *message); ++ const char *message) LIBXML_ATTR_FORMAT(3,0); + static int + xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr ctxt, + xmlSchemaTypePtr type, +@@ -1889,7 +1889,7 @@ xmlSchemaPErrMemory(xmlSchemaParserCtxtPtr ctxt, + * + * Handle a parser error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, + const char *msg, const xmlChar * str1, const xmlChar * str2) + { +@@ -1922,7 +1922,7 @@ xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, + * + * Handle a parser error + */ +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaPErr2(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, + xmlNodePtr child, int error, + const char *msg, const xmlChar * str1, const xmlChar * str2) +@@ -1951,7 +1951,7 @@ xmlSchemaPErr2(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, + * + * Handle a parser error + */ +-static void ++static void LIBXML_ATTR_FORMAT(7,0) + xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, + const xmlChar * strData1, const xmlChar * strData2, + const xmlChar * strData3, const char *msg, const xmlChar * str1, +@@ -2002,7 +2002,7 @@ xmlSchemaVErrMemory(xmlSchemaValidCtxtPtr ctxt, + extra); + } + +-static void ++static void LIBXML_ATTR_FORMAT(2,0) + xmlSchemaPSimpleInternalErr(xmlNodePtr node, + const char *msg, const xmlChar *str) + { +@@ -2013,18 +2013,21 @@ xmlSchemaPSimpleInternalErr(xmlNodePtr node, + #define WXS_ERROR_TYPE_ERROR 1 + #define WXS_ERROR_TYPE_WARNING 2 + /** +- * xmlSchemaErr3: ++ * xmlSchemaErr4Line: + * @ctxt: the validation context +- * @node: the context node ++ * @errorLevel: the error level + * @error: the error code ++ * @node: the context node ++ * @line: the line number + * @msg: the error message + * @str1: extra data + * @str2: extra data + * @str3: extra data ++ * @str4: extra data + * + * Handle a validation error + */ +-static void ++static void LIBXML_ATTR_FORMAT(6,0) + xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt, + xmlErrorLevel errorLevel, + int error, xmlNodePtr node, int line, const char *msg, +@@ -2139,7 +2142,7 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt, + * + * Handle a validation error + */ +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt, + int error, xmlNodePtr node, const char *msg, + const xmlChar *str1, const xmlChar *str2, const xmlChar *str3) +@@ -2148,7 +2151,7 @@ xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt, + msg, str1, str2, str3, NULL); + } + +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt, + int error, xmlNodePtr node, const char *msg, + const xmlChar *str1, const xmlChar *str2, +@@ -2158,7 +2161,7 @@ xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt, + msg, str1, str2, str3, str4); + } + +-static void ++static void LIBXML_ATTR_FORMAT(4,0) + xmlSchemaErr(xmlSchemaAbstractCtxtPtr actxt, + int error, xmlNodePtr node, const char *msg, + const xmlChar *str1, const xmlChar *str2) +@@ -2181,7 +2184,7 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, + /* + * Don't try to format other nodes than element and + * attribute nodes. +- * Play save and return an empty string. ++ * Play safe and return an empty string. + */ + *msg = xmlStrdup(BAD_CAST ""); + return(*msg); +@@ -2262,7 +2265,7 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, + return (*msg); + } + +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlSchemaInternalErr2(xmlSchemaAbstractCtxtPtr actxt, + const char *funcName, + const char *message, +@@ -2273,24 +2276,21 @@ xmlSchemaInternalErr2(xmlSchemaAbstractCtxtPtr actxt, + + if (actxt == NULL) + return; +- msg = xmlStrdup(BAD_CAST "Internal error: "); +- msg = xmlStrcat(msg, BAD_CAST funcName); +- msg = xmlStrcat(msg, BAD_CAST ", "); ++ msg = xmlStrdup(BAD_CAST "Internal error: %s, "); + msg = xmlStrcat(msg, BAD_CAST message); + msg = xmlStrcat(msg, BAD_CAST ".\n"); + + if (actxt->type == XML_SCHEMA_CTXT_VALIDATOR) +- xmlSchemaErr(actxt, XML_SCHEMAV_INTERNAL, NULL, +- (const char *) msg, str1, str2); +- ++ xmlSchemaErr3(actxt, XML_SCHEMAV_INTERNAL, NULL, ++ (const char *) msg, (const xmlChar *) funcName, str1, str2); + else if (actxt->type == XML_SCHEMA_CTXT_PARSER) +- xmlSchemaErr(actxt, XML_SCHEMAP_INTERNAL, NULL, +- (const char *) msg, str1, str2); ++ xmlSchemaErr3(actxt, XML_SCHEMAP_INTERNAL, NULL, ++ (const char *) msg, (const xmlChar *) funcName, str1, str2); + + FREE_AND_NULL(msg) + } + +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt, + const char *funcName, + const char *message) +@@ -2299,7 +2299,7 @@ xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt, + } + + #if 0 +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt, + const char *funcName, + const char *message, +@@ -2311,7 +2311,7 @@ xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt, + } + #endif + +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, +@@ -2336,7 +2336,7 @@ xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt, + FREE_AND_NULL(msg) + } + +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, +@@ -2351,7 +2351,7 @@ xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt, + + + +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, +@@ -2376,7 +2376,7 @@ xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, + + + +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt, + xmlParserErrors error, + xmlSchemaPSVIIDCNodePtr idcNode, +@@ -2525,7 +2525,7 @@ xmlSchemaIllegalAttrErr(xmlSchemaAbstractCtxtPtr actxt, + FREE_AND_NULL(msg) + } + +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, +@@ -2625,7 +2625,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, + xmlFree(msg); + } + +-static void ++static void LIBXML_ATTR_FORMAT(8,0) + xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, +@@ -2916,7 +2916,7 @@ xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt, + * + * Reports an error during parsing. + */ +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, + xmlParserErrors error, + xmlSchemaBasicItemPtr item, +@@ -2952,7 +2952,7 @@ xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, + * + * Reports an error during parsing. + */ +-static void ++static void LIBXML_ATTR_FORMAT(5,0) + xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt, + xmlParserErrors error, + xmlSchemaBasicItemPtr item, +@@ -2977,7 +2977,7 @@ xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt, + * + * Reports an attribute use error during parsing. + */ +-static void ++static void LIBXML_ATTR_FORMAT(6,0) + xmlSchemaPAttrUseErr4(xmlSchemaParserCtxtPtr ctxt, + xmlParserErrors error, + xmlNodePtr node, +@@ -3099,7 +3099,7 @@ xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt, + * Reports a simple type validation error. + * TODO: Should this report the value of an element as well? + */ +-static void ++static void LIBXML_ATTR_FORMAT(8,0) + xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, + xmlParserErrors error, + xmlSchemaBasicItemPtr ownerItem ATTRIBUTE_UNUSED, +diff --git a/xmlstring.c b/xmlstring.c +index 00287d4..42e380f 100644 +--- a/xmlstring.c ++++ b/xmlstring.c +@@ -545,7 +545,7 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) { + * Returns the number of characters written to @buf or -1 if an error occurs. + */ + int XMLCDECL +-xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) { ++xmlStrPrintf(xmlChar *buf, int len, const char *msg, ...) { + va_list args; + int ret; + +@@ -573,7 +573,7 @@ xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) { + * Returns the number of characters written to @buf or -1 if an error occurs. + */ + int +-xmlStrVPrintf(xmlChar *buf, int len, const xmlChar *msg, va_list ap) { ++xmlStrVPrintf(xmlChar *buf, int len, const char *msg, va_list ap) { + int ret; + + if((buf == NULL) || (msg == NULL)) { +diff --git a/xmlwriter.c b/xmlwriter.c +index fac20ac..69541b8 100644 +--- a/xmlwriter.c ++++ b/xmlwriter.c +@@ -113,7 +113,7 @@ static int xmlTextWriterWriteDocCallback(void *context, + const xmlChar * str, int len); + static int xmlTextWriterCloseDocCallback(void *context); + +-static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr); ++static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr) LIBXML_ATTR_FORMAT(1,0); + static int xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len, + const unsigned char *data); + static void xmlTextWriterStartDocumentCallback(void *ctx); +@@ -153,7 +153,7 @@ xmlWriterErrMsg(xmlTextWriterPtr ctxt, xmlParserErrors error, + * + * Handle a writer error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error, + const char *msg, int val) + { +diff --git a/xpath.c b/xpath.c +index 620e814..113bce6 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -639,7 +639,7 @@ xmlXPathErrMemory(xmlXPathContextPtr ctxt, const char *extra) + xmlChar buf[200]; + + xmlStrPrintf(buf, 200, +- BAD_CAST "Memory allocation failed : %s\n", ++ "Memory allocation failed : %s\n", + extra); + ctxt->lastError.message = (char *) xmlStrdup(buf); + } else { +diff --git a/xpointer.c b/xpointer.c +index 4b4ac2e..676c510 100644 +--- a/xpointer.c ++++ b/xpointer.c +@@ -85,7 +85,7 @@ xmlXPtrErrMemory(const char *extra) + * + * Handle a redefinition of attribute error + */ +-static void ++static void LIBXML_ATTR_FORMAT(3,0) + xmlXPtrErr(xmlXPathParserContextPtr ctxt, int error, + const char * msg, const xmlChar *extra) + { +-- +cgit v0.12 + diff -Nru libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-2.patch libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-2.patch --- libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-2.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4448-2.patch 2017-03-14 20:05:29.000000000 +0000 @@ -0,0 +1,204 @@ +From 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b Mon Sep 17 00:00:00 2001 +From: David Kilzer +Date: Mon, 23 May 2016 14:58:41 +0800 +Subject: More format string warnings with possible format string vulnerability + +For https://bugzilla.gnome.org/show_bug.cgi?id=761029 + +adds a new xmlEscapeFormatString() function to escape composed format +strings +--- + libxml.h | 3 +++ + relaxng.c | 3 ++- + xmlschemas.c | 39 ++++++++++++++++++++++++++------------- + xmlstring.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 86 insertions(+), 14 deletions(-) + +diff --git a/libxml.h b/libxml.h +index 4558b70..88e515f 100644 +--- a/libxml.h ++++ b/libxml.h +@@ -9,6 +9,8 @@ + #ifndef __XML_LIBXML_H__ + #define __XML_LIBXML_H__ + ++#include ++ + #ifndef NO_LARGEFILE_SOURCE + #ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE +@@ -93,6 +95,7 @@ int __xmlInitializeDict(void); + int __xmlRandom(void); + #endif + ++XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg); + int xmlNop(void); + + #ifdef IN_LIBXML +diff --git a/relaxng.c b/relaxng.c +index 345f354..56a3344 100644 +--- a/relaxng.c ++++ b/relaxng.c +@@ -2215,7 +2215,8 @@ xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1, + snprintf(msg, 1000, "Unknown error code %d\n", err); + } + msg[1000 - 1] = 0; +- return (xmlStrdup((xmlChar *) msg)); ++ xmlChar *result = xmlCharStrdup(msg); ++ return (xmlEscapeFormatString(&result)); + } + + /** +diff --git a/xmlschemas.c b/xmlschemas.c +index 76f2119..e1b3a4f 100644 +--- a/xmlschemas.c ++++ b/xmlschemas.c +@@ -1769,7 +1769,7 @@ xmlSchemaFormatItemForReport(xmlChar **buf, + } + FREE_AND_NULL(str) + +- return (*buf); ++ return (xmlEscapeFormatString(buf)); + } + + /** +@@ -2249,6 +2249,13 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, + TODO + return (NULL); + } ++ ++ /* ++ * xmlSchemaFormatItemForReport() also returns an escaped format ++ * string, so do this before calling it below (in the future). ++ */ ++ xmlEscapeFormatString(msg); ++ + /* + * VAL TODO: The output of the given schema component is currently + * disabled. +@@ -2476,11 +2483,13 @@ xmlSchemaSimpleTypeErr(xmlSchemaAbstractCtxtPtr actxt, + msg = xmlStrcat(msg, BAD_CAST " '"); + if (type->builtInType != 0) { + msg = xmlStrcat(msg, BAD_CAST "xs:"); +- msg = xmlStrcat(msg, type->name); +- } else +- msg = xmlStrcat(msg, +- xmlSchemaFormatQName(&str, +- type->targetNamespace, type->name)); ++ str = xmlStrdup(type->name); ++ } else { ++ const xmlChar *qName = xmlSchemaFormatQName(&str, type->targetNamespace, type->name); ++ if (!str) ++ str = xmlStrdup(qName); ++ } ++ msg = xmlStrcat(msg, xmlEscapeFormatString(&str)); + msg = xmlStrcat(msg, BAD_CAST "'"); + FREE_AND_NULL(str); + } +@@ -2617,7 +2626,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, + str = xmlStrcat(str, BAD_CAST ", "); + } + str = xmlStrcat(str, BAD_CAST " ).\n"); +- msg = xmlStrcat(msg, BAD_CAST str); ++ msg = xmlStrcat(msg, xmlEscapeFormatString(&str)); + FREE_AND_NULL(str) + } else + msg = xmlStrcat(msg, BAD_CAST "\n"); +@@ -3141,11 +3150,13 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, + msg = xmlStrcat(msg, BAD_CAST " '"); + if (type->builtInType != 0) { + msg = xmlStrcat(msg, BAD_CAST "xs:"); +- msg = xmlStrcat(msg, type->name); +- } else +- msg = xmlStrcat(msg, +- xmlSchemaFormatQName(&str, +- type->targetNamespace, type->name)); ++ str = xmlStrdup(type->name); ++ } else { ++ const xmlChar *qName = xmlSchemaFormatQName(&str, type->targetNamespace, type->name); ++ if (!str) ++ str = xmlStrdup(qName); ++ } ++ msg = xmlStrcat(msg, xmlEscapeFormatString(&str)); + msg = xmlStrcat(msg, BAD_CAST "'."); + FREE_AND_NULL(str); + } +@@ -3158,7 +3169,9 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, + } + if (expected) { + msg = xmlStrcat(msg, BAD_CAST " Expected is '"); +- msg = xmlStrcat(msg, BAD_CAST expected); ++ xmlChar *expectedEscaped = xmlCharStrdup(expected); ++ msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped)); ++ FREE_AND_NULL(expectedEscaped); + msg = xmlStrcat(msg, BAD_CAST "'.\n"); + } else + msg = xmlStrcat(msg, BAD_CAST "\n"); +diff --git a/xmlstring.c b/xmlstring.c +index 42e380f..cc85777 100644 +--- a/xmlstring.c ++++ b/xmlstring.c +@@ -987,5 +987,60 @@ xmlUTF8Strsub(const xmlChar *utf, int start, int len) { + return(xmlUTF8Strndup(utf, len)); + } + ++/** ++ * xmlEscapeFormatString: ++ * @msg: a pointer to the string in which to escape '%' characters. ++ * Must be a heap-allocated buffer created by libxml2 that may be ++ * returned, or that may be freed and replaced. ++ * ++ * Replaces the string pointed to by 'msg' with an escaped string. ++ * Returns the same string with all '%' characters escaped. ++ */ ++xmlChar * ++xmlEscapeFormatString(xmlChar **msg) ++{ ++ xmlChar *msgPtr = NULL; ++ xmlChar *result = NULL; ++ xmlChar *resultPtr = NULL; ++ size_t count = 0; ++ size_t msgLen = 0; ++ size_t resultLen = 0; ++ ++ if (!msg || !*msg) ++ return(NULL); ++ ++ for (msgPtr = *msg; *msgPtr != '\0'; ++msgPtr) { ++ ++msgLen; ++ if (*msgPtr == '%') ++ ++count; ++ } ++ ++ if (count == 0) ++ return(*msg); ++ ++ resultLen = msgLen + count + 1; ++ result = (xmlChar *) xmlMallocAtomic(resultLen * sizeof(xmlChar)); ++ if (result == NULL) { ++ /* Clear *msg to prevent format string vulnerabilities in ++ out-of-memory situations. */ ++ xmlFree(*msg); ++ *msg = NULL; ++ xmlErrMemory(NULL, NULL); ++ return(NULL); ++ } ++ ++ for (msgPtr = *msg, resultPtr = result; *msgPtr != '\0'; ++msgPtr, ++resultPtr) { ++ *resultPtr = *msgPtr; ++ if (*msgPtr == '%') ++ *(++resultPtr) = '%'; ++ } ++ result[resultLen - 1] = '\0'; ++ ++ xmlFree(*msg); ++ *msg = result; ++ ++ return *msg; ++} ++ + #define bottom_xmlstring + #include "elfgcchack.h" +-- +cgit v0.12 + diff -Nru libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4658.patch libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4658.patch --- libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4658.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-4658.patch 2017-03-14 20:05:39.000000000 +0000 @@ -0,0 +1,249 @@ +From c1d1f7121194036608bf555f08d3062a36fd344b Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Tue, 28 Jun 2016 18:34:52 +0200 +Subject: Disallow namespace nodes in XPointer ranges + +Namespace nodes must be copied to avoid use-after-free errors. +But they don't necessarily have a physical representation in a +document, so simply disallow them in XPointer ranges. + +Found with afl-fuzz. + +Fixes CVE-2016-4658. +--- + xpointer.c | 149 +++++++++++++++++++++++-------------------------------------- + 1 file changed, 56 insertions(+), 93 deletions(-) + +diff --git a/xpointer.c b/xpointer.c +index a7b03fb..694d120 100644 +--- a/xpointer.c ++++ b/xpointer.c +@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) { + } + + /** ++ * xmlXPtrNewRangeInternal: ++ * @start: the starting node ++ * @startindex: the start index ++ * @end: the ending point ++ * @endindex: the ending index ++ * ++ * Internal function to create a new xmlXPathObjectPtr of type range ++ * ++ * Returns the newly created object. ++ */ ++static xmlXPathObjectPtr ++xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex, ++ xmlNodePtr end, int endindex) { ++ xmlXPathObjectPtr ret; ++ ++ /* ++ * Namespace nodes must be copied (see xmlXPathNodeSetDupNs). ++ * Disallow them for now. ++ */ ++ if ((start != NULL) && (start->type == XML_NAMESPACE_DECL)) ++ return(NULL); ++ if ((end != NULL) && (end->type == XML_NAMESPACE_DECL)) ++ return(NULL); ++ ++ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); ++ if (ret == NULL) { ++ xmlXPtrErrMemory("allocating range"); ++ return(NULL); ++ } ++ memset(ret, 0, sizeof(xmlXPathObject)); ++ ret->type = XPATH_RANGE; ++ ret->user = start; ++ ret->index = startindex; ++ ret->user2 = end; ++ ret->index2 = endindex; ++ return(ret); ++} ++ ++/** + * xmlXPtrNewRange: + * @start: the starting node + * @startindex: the start index +@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex, + if (endindex < 0) + return(NULL); + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start; +- ret->index = startindex; +- ret->user2 = end; +- ret->index2 = endindex; ++ ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex); + xmlXPtrRangeCheckOrder(ret); + return(ret); + } +@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) { + if (end->type != XPATH_POINT) + return(NULL); + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start->user; +- ret->index = start->index; +- ret->user2 = end->user; +- ret->index2 = end->index; ++ ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user, ++ end->index); + xmlXPtrRangeCheckOrder(ret); + return(ret); + } +@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) { + if (start->type != XPATH_POINT) + return(NULL); + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start->user; +- ret->index = start->index; +- ret->user2 = end; +- ret->index2 = -1; ++ ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1); + xmlXPtrRangeCheckOrder(ret); + return(ret); + } +@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) { + if (end->type != XPATH_POINT) + return(NULL); + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start; +- ret->index = -1; +- ret->user2 = end->user; +- ret->index2 = end->index; ++ ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index); + xmlXPtrRangeCheckOrder(ret); + return(ret); + } +@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) { + if (end == NULL) + return(NULL); + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start; +- ret->index = -1; +- ret->user2 = end; +- ret->index2 = -1; ++ ret = xmlXPtrNewRangeInternal(start, -1, end, -1); + xmlXPtrRangeCheckOrder(ret); + return(ret); + } +@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) { + if (start == NULL) + return(NULL); + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start; +- ret->index = -1; +- ret->user2 = NULL; +- ret->index2 = -1; ++ ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1); + return(ret); + } + +@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) { + */ + xmlXPathObjectPtr + xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { ++ xmlNodePtr endNode; ++ int endIndex; + xmlXPathObjectPtr ret; + + if (start == NULL) +@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { + return(NULL); + switch (end->type) { + case XPATH_POINT: ++ endNode = end->user; ++ endIndex = end->index; ++ break; + case XPATH_RANGE: ++ endNode = end->user2; ++ endIndex = end->index2; + break; + case XPATH_NODESET: + /* +@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { + */ + if (end->nodesetval->nodeNr <= 0) + return(NULL); ++ endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1]; ++ endIndex = -1; + break; + default: + /* TODO */ + return(NULL); + } + +- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); +- if (ret == NULL) { +- xmlXPtrErrMemory("allocating range"); +- return(NULL); +- } +- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); +- ret->type = XPATH_RANGE; +- ret->user = start; +- ret->index = -1; +- switch (end->type) { +- case XPATH_POINT: +- ret->user2 = end->user; +- ret->index2 = end->index; +- break; +- case XPATH_RANGE: +- ret->user2 = end->user2; +- ret->index2 = end->index2; +- break; +- case XPATH_NODESET: { +- ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1]; +- ret->index2 = -1; +- break; +- } +- default: +- STRANGE +- return(NULL); +- } ++ ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex); + xmlXPtrRangeCheckOrder(ret); + return(ret); + } +-- +cgit v0.12 + diff -Nru libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-1.patch libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-1.patch --- libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-1.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-1.patch 2017-03-14 20:05:55.000000000 +0000 @@ -0,0 +1,142 @@ +From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Tue, 28 Jun 2016 14:22:23 +0200 +Subject: Fix XPointer paths beginning with range-to + +The old code would invoke the broken xmlXPtrRangeToFunction. range-to +isn't really a function but a special kind of location step. Remove +this function and always handle range-to in the XPath code. + +The old xmlXPtrRangeToFunction could also be abused to trigger a +use-after-free error with the potential for remote code execution. + +Found with afl-fuzz. + +Fixes CVE-2016-5131. +--- + result/XPath/xptr/vidbase | 13 ++++++++ + test/XPath/xptr/vidbase | 1 + + xpath.c | 7 ++++- + xpointer.c | 76 ++++------------------------------------------- + 4 files changed, 26 insertions(+), 71 deletions(-) + +Index: libxml2-2.9.3+dfsg1/xpath.c +=================================================================== +--- libxml2-2.9.3+dfsg1.orig/xpath.c 2017-03-14 16:05:53.137793821 -0400 ++++ libxml2-2.9.3+dfsg1/xpath.c 2017-03-14 16:05:53.133793777 -0400 +@@ -10691,13 +10691,18 @@ + lc = 1; + break; + } else if ((NXT(len) == '(')) { +- /* Note Type or Function */ ++ /* Node Type or Function */ + if (xmlXPathIsNodeType(name)) { + #ifdef DEBUG_STEP + xmlGenericError(xmlGenericErrorContext, + "PathExpr: Type search\n"); + #endif + lc = 1; ++#ifdef LIBXML_XPTR_ENABLED ++ } else if (ctxt->xptr && ++ xmlStrEqual(name, BAD_CAST "range-to")) { ++ lc = 1; ++#endif + } else { + #ifdef DEBUG_STEP + xmlGenericError(xmlGenericErrorContext, +Index: libxml2-2.9.3+dfsg1/xpointer.c +=================================================================== +--- libxml2-2.9.3+dfsg1.orig/xpointer.c 2017-03-14 16:05:53.137793821 -0400 ++++ libxml2-2.9.3+dfsg1/xpointer.c 2017-03-14 16:05:53.137793821 -0400 +@@ -1295,8 +1295,6 @@ + ret->here = here; + ret->origin = origin; + +- xmlXPathRegisterFunc(ret, (xmlChar *)"range-to", +- xmlXPtrRangeToFunction); + xmlXPathRegisterFunc(ret, (xmlChar *)"range", + xmlXPtrRangeFunction); + xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside", +@@ -2206,76 +2204,14 @@ + * @nargs: the number of args + * + * Implement the range-to() XPointer function ++ * ++ * Obsolete. range-to is not a real function but a special type of location ++ * step which is handled in xpath.c. + */ + void +-xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) { +- xmlXPathObjectPtr range; +- const xmlChar *cur; +- xmlXPathObjectPtr res, obj; +- xmlXPathObjectPtr tmp; +- xmlLocationSetPtr newset = NULL; +- xmlNodeSetPtr oldset; +- int i; +- +- if (ctxt == NULL) return; +- CHECK_ARITY(1); +- /* +- * Save the expression pointer since we will have to evaluate +- * it multiple times. Initialize the new set. +- */ +- CHECK_TYPE(XPATH_NODESET); +- obj = valuePop(ctxt); +- oldset = obj->nodesetval; +- ctxt->context->node = NULL; +- +- cur = ctxt->cur; +- newset = xmlXPtrLocationSetCreate(NULL); +- +- for (i = 0; i < oldset->nodeNr; i++) { +- ctxt->cur = cur; +- +- /* +- * Run the evaluation with a node list made of a single item +- * in the nodeset. +- */ +- ctxt->context->node = oldset->nodeTab[i]; +- tmp = xmlXPathNewNodeSet(ctxt->context->node); +- valuePush(ctxt, tmp); +- +- xmlXPathEvalExpr(ctxt); +- CHECK_ERROR; +- +- /* +- * The result of the evaluation need to be tested to +- * decided whether the filter succeeded or not +- */ +- res = valuePop(ctxt); +- range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res); +- if (range != NULL) { +- xmlXPtrLocationSetAdd(newset, range); +- } +- +- /* +- * Cleanup +- */ +- if (res != NULL) +- xmlXPathFreeObject(res); +- if (ctxt->value == tmp) { +- res = valuePop(ctxt); +- xmlXPathFreeObject(res); +- } +- +- ctxt->context->node = NULL; +- } +- +- /* +- * The result is used as the new evaluation set. +- */ +- xmlXPathFreeObject(obj); +- ctxt->context->node = NULL; +- ctxt->context->contextSize = -1; +- ctxt->context->proximityPosition = -1; +- valuePush(ctxt, xmlXPtrWrapLocationSet(newset)); ++xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, ++ int nargs ATTRIBUTE_UNUSED) { ++ XP_ERROR(XPATH_EXPR_ERROR); + } + + /** diff -Nru libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-2.patch libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-2.patch --- libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-2.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/CVE-2016-5131-2.patch 2017-03-14 20:06:01.000000000 +0000 @@ -0,0 +1,34 @@ +From a005199330b86dada19d162cae15ef9bdcb6baa8 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Tue, 28 Jun 2016 14:19:58 +0200 +Subject: Fix comparison with root node in xmlXPathCmpNodes + +This change has already been made in xmlXPathCmpNodesExt but not in +xmlXPathCmpNodes. +--- + xpath.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xpath.c b/xpath.c +index 751665b..d992841 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) { + * compute depth to root + */ + for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) { +- if (cur == node1) ++ if (cur->parent == node1) + return(1); + depth2++; + } + root = cur; + for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) { +- if (cur == node2) ++ if (cur->parent == node2) + return(-1); + depth1++; + } +-- +cgit v0.12 + diff -Nru libxml2-2.9.3+dfsg1/debian/patches/lp1652325.patch libxml2-2.9.3+dfsg1/debian/patches/lp1652325.patch --- libxml2-2.9.3+dfsg1/debian/patches/lp1652325.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/lp1652325.patch 2017-03-14 20:05:09.000000000 +0000 @@ -0,0 +1,580 @@ +From 4f8606c13cb7f2684839f850b83de5ce647d3ca7 Mon Sep 17 00:00:00 2001 +From: David Kilzer +Date: Tue, 5 Jan 2016 13:38:09 -0800 +Subject: Bug 760183: REGRESSION (v2.9.3): XML push parser fails with bogus + UTF-8 encoding error when multi-byte character in large CDATA section is + split across buffer + +* parser.c: +(xmlCheckCdataPush): Add 'complete' argument to describe whether +the buffer passed in is the whole CDATA buffer, or if there is +more data to parse. If there is more data to parse, don't +return a negative value for an invalid multi-byte UTF-8 +character that is split between buffers. +(xmlParseTryOrFinish): Pass 'complete' argument to +xmlCheckCdataPush() as appropriate. + +* result/cdata-2-byte-UTF-8.xml: Added. +* result/cdata-2-byte-UTF-8.xml.rde: Added. +* result/cdata-2-byte-UTF-8.xml.rdr: Added. +* result/cdata-2-byte-UTF-8.xml.sax: Added. +* result/cdata-2-byte-UTF-8.xml.sax2: Added. +* result/cdata-3-byte-UTF-8.xml: Added. +* result/cdata-3-byte-UTF-8.xml.rde: Added. +* result/cdata-3-byte-UTF-8.xml.rdr: Added. +* result/cdata-3-byte-UTF-8.xml.sax: Added. +* result/cdata-3-byte-UTF-8.xml.sax2: Added. +* result/cdata-4-byte-UTF-8.xml: Added. +* result/cdata-4-byte-UTF-8.xml.rde: Added. +* result/cdata-4-byte-UTF-8.xml.rdr: Added. +* result/cdata-4-byte-UTF-8.xml.sax: Added. +* result/cdata-4-byte-UTF-8.xml.sax2: Added. +* result/noent/cdata-2-byte-UTF-8.xml: Added. +* result/noent/cdata-3-byte-UTF-8.xml: Added. +* result/noent/cdata-4-byte-UTF-8.xml: Added. +* test/cdata-2-byte-UTF-8.xml: Added. +* test/cdata-3-byte-UTF-8.xml: Added. +* test/cdata-4-byte-UTF-8.xml: Added. +- Add tests and results. Only 'make Readertests XMLPushtests' + fails prior to the fix. +--- + parser.c | 15 ++++++++------- + result/cdata-2-byte-UTF-8.xml | 6 ++++++ + result/cdata-2-byte-UTF-8.xml.rde | 15 +++++++++++++++ + result/cdata-2-byte-UTF-8.xml.rdr | 15 +++++++++++++++ + result/cdata-2-byte-UTF-8.xml.sax | 18 ++++++++++++++++++ + result/cdata-2-byte-UTF-8.xml.sax2 | 18 ++++++++++++++++++ + result/cdata-3-byte-UTF-8.xml | 7 +++++++ + result/cdata-3-byte-UTF-8.xml.rde | 20 ++++++++++++++++++++ + result/cdata-3-byte-UTF-8.xml.rdr | 20 ++++++++++++++++++++ + result/cdata-3-byte-UTF-8.xml.sax | 23 +++++++++++++++++++++++ + result/cdata-3-byte-UTF-8.xml.sax2 | 23 +++++++++++++++++++++++ + result/cdata-4-byte-UTF-8.xml | 8 ++++++++ + result/cdata-4-byte-UTF-8.xml.rde | 25 +++++++++++++++++++++++++ + result/cdata-4-byte-UTF-8.xml.rdr | 25 +++++++++++++++++++++++++ + result/cdata-4-byte-UTF-8.xml.sax | 28 ++++++++++++++++++++++++++++ + result/cdata-4-byte-UTF-8.xml.sax2 | 28 ++++++++++++++++++++++++++++ + result/noent/cdata-2-byte-UTF-8.xml | 6 ++++++ + result/noent/cdata-3-byte-UTF-8.xml | 7 +++++++ + result/noent/cdata-4-byte-UTF-8.xml | 8 ++++++++ + test/cdata-2-byte-UTF-8.xml | 6 ++++++ + test/cdata-3-byte-UTF-8.xml | 7 +++++++ + test/cdata-4-byte-UTF-8.xml | 8 ++++++++ + 22 files changed, 329 insertions(+), 7 deletions(-) + create mode 100644 result/cdata-2-byte-UTF-8.xml + create mode 100644 result/cdata-2-byte-UTF-8.xml.rde + create mode 100644 result/cdata-2-byte-UTF-8.xml.rdr + create mode 100644 result/cdata-2-byte-UTF-8.xml.sax + create mode 100644 result/cdata-2-byte-UTF-8.xml.sax2 + create mode 100644 result/cdata-3-byte-UTF-8.xml + create mode 100644 result/cdata-3-byte-UTF-8.xml.rde + create mode 100644 result/cdata-3-byte-UTF-8.xml.rdr + create mode 100644 result/cdata-3-byte-UTF-8.xml.sax + create mode 100644 result/cdata-3-byte-UTF-8.xml.sax2 + create mode 100644 result/cdata-4-byte-UTF-8.xml + create mode 100644 result/cdata-4-byte-UTF-8.xml.rde + create mode 100644 result/cdata-4-byte-UTF-8.xml.rdr + create mode 100644 result/cdata-4-byte-UTF-8.xml.sax + create mode 100644 result/cdata-4-byte-UTF-8.xml.sax2 + create mode 100644 result/noent/cdata-2-byte-UTF-8.xml + create mode 100644 result/noent/cdata-3-byte-UTF-8.xml + create mode 100644 result/noent/cdata-4-byte-UTF-8.xml + create mode 100644 test/cdata-2-byte-UTF-8.xml + create mode 100644 test/cdata-3-byte-UTF-8.xml + create mode 100644 test/cdata-4-byte-UTF-8.xml + +Index: libxml2-2.9.3+dfsg1/parser.c +=================================================================== +--- libxml2-2.9.3+dfsg1.orig/parser.c 2017-03-14 16:05:02.893244645 -0400 ++++ libxml2-2.9.3+dfsg1/parser.c 2017-03-14 16:05:02.889244601 -0400 +@@ -11249,8 +11249,9 @@ + } + /** + * xmlCheckCdataPush: +- * @cur: pointer to the bock of characters ++ * @cur: pointer to the block of characters + * @len: length of the block in bytes ++ * @complete: 1 if complete CDATA block is passed in, 0 if partial block + * + * Check that the block of characters is okay as SCdata content [20] + * +@@ -11258,7 +11259,7 @@ + * UTF-8 error occured otherwise + */ + static int +-xmlCheckCdataPush(const xmlChar *utf, int len) { ++xmlCheckCdataPush(const xmlChar *utf, int len, int complete) { + int ix; + unsigned char c; + int codepoint; +@@ -11276,7 +11277,7 @@ + else + return(-ix); + } else if ((c & 0xe0) == 0xc0) {/* 2-byte code, starts with 110 */ +- if (ix + 2 > len) return(-ix); ++ if (ix + 2 > len) return(complete ? -ix : ix); + if ((utf[ix+1] & 0xc0 ) != 0x80) + return(-ix); + codepoint = (utf[ix] & 0x1f) << 6; +@@ -11285,7 +11286,7 @@ + return(-ix); + ix += 2; + } else if ((c & 0xf0) == 0xe0) {/* 3-byte code, starts with 1110 */ +- if (ix + 3 > len) return(-ix); ++ if (ix + 3 > len) return(complete ? -ix : ix); + if (((utf[ix+1] & 0xc0) != 0x80) || + ((utf[ix+2] & 0xc0) != 0x80)) + return(-ix); +@@ -11296,7 +11297,7 @@ + return(-ix); + ix += 3; + } else if ((c & 0xf8) == 0xf0) {/* 4-byte code, starts with 11110 */ +- if (ix + 4 > len) return(-ix); ++ if (ix + 4 > len) return(complete ? -ix : ix); + if (((utf[ix+1] & 0xc0) != 0x80) || + ((utf[ix+2] & 0xc0) != 0x80) || + ((utf[ix+3] & 0xc0) != 0x80)) +@@ -11811,7 +11812,7 @@ + int tmp; + + tmp = xmlCheckCdataPush(ctxt->input->cur, +- XML_PARSER_BIG_BUFFER_SIZE); ++ XML_PARSER_BIG_BUFFER_SIZE, 0); + if (tmp < 0) { + tmp = -tmp; + ctxt->input->cur += tmp; +@@ -11834,7 +11835,7 @@ + } else { + int tmp; + +- tmp = xmlCheckCdataPush(ctxt->input->cur, base); ++ tmp = xmlCheckCdataPush(ctxt->input->cur, base, 1); + if ((tmp < 0) || (tmp != base)) { + tmp = -tmp; + ctxt->input->cur += tmp; +Index: libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,6 @@ ++ ++ ++ ++

++

++
+Index: libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.rde +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.rde 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,15 @@ ++0 8 #comment 0 1 This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ++0 1 doc 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 ト呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 ト呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++0 15 doc 0 0 +Index: libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.rdr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.rdr 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,15 @@ ++0 8 #comment 0 1 This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ++0 1 doc 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 ト呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 ト呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼呼 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++0 15 doc 0 0 +Index: libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.sax +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.sax 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,18 @@ ++SAX.setDocumentLocator() ++SAX.startDocument() ++SAX.comment( This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ) ++SAX.startElement(doc) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata(ト呼呼呼呼呼呼呼呼呼, 1200) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata( ト呼呼呼呼呼呼呼呼呼, 1201) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.endElement(doc) ++SAX.endDocument() +Index: libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.sax2 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-2-byte-UTF-8.xml.sax2 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,18 @@ ++SAX.setDocumentLocator() ++SAX.startDocument() ++SAX.comment( This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ) ++SAX.startElementNs(doc, NULL, NULL, 0, 0, 0) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata(ト呼呼呼呼呼呼呼呼呼, 1200) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata( ト呼呼呼呼呼呼呼呼呼, 1201) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.endElementNs(doc, NULL, NULL) ++SAX.endDocument() +Index: libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,7 @@ ++ ++ ++ ++

++

++

++
+Index: libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.rde +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.rde 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,20 @@ ++0 8 #comment 0 1 This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ++0 1 doc 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++0 15 doc 0 0 +Index: libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.rdr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.rdr 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,20 @@ ++0 8 #comment 0 1 This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ++0 1 doc 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央迚帷央 ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++0 15 doc 0 0 +Index: libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.sax +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.sax 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,23 @@ ++SAX.setDocumentLocator() ++SAX.startDocument() ++SAX.comment( This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ) ++SAX.startElement(doc) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata(迚帷央迚帷央迚帷央迚, 1200) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata( 迚帷央迚帷央迚帷央, 1201) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata( 迚帷央迚帷央迚帷央, 1202) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.endElement(doc) ++SAX.endDocument() +Index: libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.sax2 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-3-byte-UTF-8.xml.sax2 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,23 @@ ++SAX.setDocumentLocator() ++SAX.startDocument() ++SAX.comment( This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ) ++SAX.startElementNs(doc, NULL, NULL, 0, 0, 0) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata(迚帷央迚帷央迚帷央迚, 1200) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata( 迚帷央迚帷央迚帷央, 1201) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata( 迚帷央迚帷央迚帷央, 1202) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.endElementNs(doc, NULL, NULL) ++SAX.endDocument() +Index: libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,8 @@ ++ ++ ++ ++

++

++

++

++
+Index: libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.rde +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.rde 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,25 @@ ++0 8 #comment 0 1 This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ++0 1 doc 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++0 15 doc 0 0 +Index: libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.rdr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.rdr 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,25 @@ ++0 8 #comment 0 1 This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ++0 1 doc 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++1 1 p 0 0 ++2 4 #cdata-section 0 1 沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ ++1 15 p 0 0 ++1 14 #text 0 1 ++ ++0 15 doc 0 0 +Index: libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.sax +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.sax 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,28 @@ ++SAX.setDocumentLocator() ++SAX.startDocument() ++SAX.comment( This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ) ++SAX.startElement(doc) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata(沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ, 1200) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata( 沚ヲ沚ヲ沚ヲ沚ヲ沚, 1201) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata( 沚ヲ沚ヲ沚ヲ沚ヲ, 1202) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.startElement(p) ++SAX.pcdata( 沚ヲ沚ヲ沚ヲ沚ヲ, 1203) ++SAX.endElement(p) ++SAX.characters( ++, 1) ++SAX.endElement(doc) ++SAX.endDocument() +Index: libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.sax2 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/cdata-4-byte-UTF-8.xml.sax2 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,28 @@ ++SAX.setDocumentLocator() ++SAX.startDocument() ++SAX.comment( This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). ) ++SAX.startElementNs(doc, NULL, NULL, 0, 0, 0) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata(沚ヲ沚ヲ沚ヲ沚ヲ沚ヲ, 1200) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata( 沚ヲ沚ヲ沚ヲ沚ヲ沚, 1201) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata( 沚ヲ沚ヲ沚ヲ沚ヲ, 1202) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.startElementNs(p, NULL, NULL, 0, 0, 0) ++SAX.pcdata( 沚ヲ沚ヲ沚ヲ沚ヲ, 1203) ++SAX.endElementNs(p, NULL, NULL) ++SAX.characters( ++, 1) ++SAX.endElementNs(doc, NULL, NULL) ++SAX.endDocument() +Index: libxml2-2.9.3+dfsg1/result/noent/cdata-2-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/noent/cdata-2-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,6 @@ ++ ++ ++ ++

++

++
+Index: libxml2-2.9.3+dfsg1/result/noent/cdata-3-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/noent/cdata-3-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,7 @@ ++ ++ ++ ++

++

++

++
+Index: libxml2-2.9.3+dfsg1/result/noent/cdata-4-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/result/noent/cdata-4-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,8 @@ ++ ++ ++ ++

++

++

++

++
+Index: libxml2-2.9.3+dfsg1/test/cdata-2-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/test/cdata-2-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,6 @@ ++ ++ ++ ++

++

++
+Index: libxml2-2.9.3+dfsg1/test/cdata-3-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/test/cdata-3-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,7 @@ ++ ++ ++ ++

++

++

++
+Index: libxml2-2.9.3+dfsg1/test/cdata-4-byte-UTF-8.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libxml2-2.9.3+dfsg1/test/cdata-4-byte-UTF-8.xml 2017-03-14 16:05:02.889244601 -0400 +@@ -0,0 +1,8 @@ ++ ++ ++ ++

++

++

++

++
diff -Nru libxml2-2.9.3+dfsg1/debian/patches/series libxml2-2.9.3+dfsg1/debian/patches/series --- libxml2-2.9.3+dfsg1/debian/patches/series 2016-06-03 12:05:29.000000000 +0000 +++ libxml2-2.9.3+dfsg1/debian/patches/series 2017-03-14 20:06:01.000000000 +0000 @@ -14,3 +14,9 @@ CVE-2016-4449.patch CVE-2016-4483.patch CVE-2016-3627.patch +lp1652325.patch +CVE-2016-4448-1.patch +CVE-2016-4448-2.patch +CVE-2016-4658.patch +CVE-2016-5131-1.patch +CVE-2016-5131-2.patch