diff options
author | Aron Xu <aron@debian.org> | 2013-06-17 23:25:32 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2013-06-17 23:31:53 +0800 |
commit | 9afca292b056860493ebcc41994f2278e5e31357 (patch) | |
tree | a17d317dbc8b0a1e76eab0c5dda5be154bfed862 | |
parent | e9ab75b284681b6f363be37b9666425c68f5280d (diff) | |
download | libxml2-9afca292b056860493ebcc41994f2278e5e31357.tar.gz |
Prepare to upload for unstabledebian/2.9.1+dfsg1-2
7 files changed, 177 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 306bd72..9b59004 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +libxml2 (2.9.1+dfsg1-2) unstable; urgency=low + + * Upload to unstable. + * debian/patches/000[2-6]-*.patch: + - cherry-picking upstream post-release fixes. + + -- Aron Xu <aron@debian.org> Mon, 17 Jun 2013 23:24:07 +0800 + libxml2 (2.9.1+dfsg1-1) experimental; urgency=low * New upstream release (Closes: #696300, #705722). diff --git a/debian/patches/0002-Fix-an-error-in-xmlCleanupParser.patch b/debian/patches/0002-Fix-an-error-in-xmlCleanupParser.patch new file mode 100644 index 0000000..03bf447 --- /dev/null +++ b/debian/patches/0002-Fix-an-error-in-xmlCleanupParser.patch @@ -0,0 +1,27 @@ +From: Alexander Pastukhov <pastuchov@yandex.ru> +Date: Tue, 23 Apr 2013 05:02:11 +0000 +Subject: Fix an error in xmlCleanupParser + +https://bugzilla.gnome.org/show_bug.cgi?id=698582 + +xmlCleanupParser calls xmlCleanupGlobals() and then +xmlResetLastError() but the later reallocate the global +data freed by previous call. Just swap the two calls. +--- + parser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/parser.c b/parser.c +index ee429f3..b9df6d8 100644 +--- a/parser.c ++++ b/parser.c +@@ -14763,8 +14763,8 @@ xmlCleanupParser(void) { + xmlSchemaCleanupTypes(); + xmlRelaxNGCleanupTypes(); + #endif +- xmlCleanupGlobals(); + xmlResetLastError(); ++ xmlCleanupGlobals(); + xmlCleanupThreads(); /* must be last if called not from the main thread */ + xmlCleanupMemory(); + xmlParserInitialized = 0; diff --git a/debian/patches/0003-Fix-missing-break-on-last-function-for-attributes.patch b/debian/patches/0003-Fix-missing-break-on-last-function-for-attributes.patch new file mode 100644 index 0000000..cff8b72 --- /dev/null +++ b/debian/patches/0003-Fix-missing-break-on-last-function-for-attributes.patch @@ -0,0 +1,21 @@ +From: dcb <dcb314@hotmail.com> +Date: Thu, 2 May 2013 08:11:46 +0000 +Subject: Fix missing break on last() function for attributes + +pointed out by cppcheck +--- + python/libxml.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/python/libxml.c b/python/libxml.c +index 03cfb9f..3338b83 100644 +--- a/python/libxml.c ++++ b/python/libxml.c +@@ -2683,6 +2683,7 @@ libxml_last(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) + xmlAttrPtr attr = (xmlAttrPtr) cur; + + res = attr->last; ++ break; + } + default: + res = NULL; diff --git a/debian/patches/0004-xmllint-memory-should-fail-on-empty-files.patch b/debian/patches/0004-xmllint-memory-should-fail-on-empty-files.patch new file mode 100644 index 0000000..e1a2197 --- /dev/null +++ b/debian/patches/0004-xmllint-memory-should-fail-on-empty-files.patch @@ -0,0 +1,27 @@ +From: Daniel Veillard <veillard@redhat.com> +Date: Wed, 8 May 2013 05:45:48 +0000 +Subject: xmllint --memory should fail on empty files + +Exposed by https://bugzilla.gnome.org/show_bug.cgi?id=699896 +when doing analysis but a priori unrelated. +--- + xmllint.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/xmllint.c b/xmllint.c +index 26d8db1..c0196ab 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -2338,8 +2338,11 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { + if ((fd = open(filename, O_RDONLY)) < 0) + return; + base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ; +- if (base == (void *) MAP_FAILED) ++ if (base == (void *) MAP_FAILED) { ++ fprintf(stderr, "mmap failure for file %s\n", filename); ++ progresult = XMLLINT_ERR_RDFILE; + return; ++ } + + if (rectxt == NULL) + doc = xmlReadMemory((char *) base, info.st_size, diff --git a/debian/patches/0005-properly-quote-the-namespace-uris-written-out-during.patch b/debian/patches/0005-properly-quote-the-namespace-uris-written-out-during.patch new file mode 100644 index 0000000..6f4c4c8 --- /dev/null +++ b/debian/patches/0005-properly-quote-the-namespace-uris-written-out-during.patch @@ -0,0 +1,32 @@ +From: Aleksey Sanin <aleksey@aleksey.com> +Date: Thu, 9 May 2013 16:02:16 +0000 +Subject: properly quote the namespace uris written out during c14n + +--- + c14n.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/c14n.c b/c14n.c +index afd95b3..ca77f92 100644 +--- a/c14n.c ++++ b/c14n.c +@@ -547,14 +547,15 @@ xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx) + if (ns->prefix != NULL) { + xmlOutputBufferWriteString(ctx->buf, " xmlns:"); + xmlOutputBufferWriteString(ctx->buf, (const char *) ns->prefix); +- xmlOutputBufferWriteString(ctx->buf, "=\""); ++ xmlOutputBufferWriteString(ctx->buf, "="); + } else { +- xmlOutputBufferWriteString(ctx->buf, " xmlns=\""); ++ xmlOutputBufferWriteString(ctx->buf, " xmlns="); + } + if(ns->href != NULL) { +- xmlOutputBufferWriteString(ctx->buf, (const char *) ns->href); ++ xmlBufWriteQuotedString(ctx->buf->buffer, ns->href); ++ } else { ++ xmlOutputBufferWriteString(ctx->buf, "\"\""); + } +- xmlOutputBufferWriteString(ctx->buf, "\""); + return (1); + } + diff --git a/debian/patches/0006-Fix-a-parsing-bug-on-non-ascii-element-and-CR-LF-usa.patch b/debian/patches/0006-Fix-a-parsing-bug-on-non-ascii-element-and-CR-LF-usa.patch new file mode 100644 index 0000000..442fd11 --- /dev/null +++ b/debian/patches/0006-Fix-a-parsing-bug-on-non-ascii-element-and-CR-LF-usa.patch @@ -0,0 +1,57 @@ +From: Daniel Veillard <veillard@redhat.com> +Date: Wed, 22 May 2013 20:56:45 +0000 +Subject: Fix a parsing bug on non-ascii element and CR/LF usage + +https://bugzilla.gnome.org/show_bug.cgi?id=698550 + +Somehow the behaviour of the internal parser routine changed +slightly when encountering CR/LF, which led to a bug when +parsing document with non-ascii Names +--- + parser.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/parser.c b/parser.c +index b9df6d8..dd00399 100644 +--- a/parser.c ++++ b/parser.c +@@ -3404,6 +3404,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) { + int len = 0, l; + int c; + int count = 0; ++ const xmlChar *end; /* needed because CUR_CHAR() can move cur on \r\n */ + + #ifdef DEBUG + nbParseNCNameComplex++; +@@ -3413,6 +3414,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) { + * Handler for more complex cases + */ + GROW; ++ end = ctxt->input->cur; + c = CUR_CHAR(l); + if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */ + (!xmlIsNameStartChar(ctxt, c) || (c == ':'))) { +@@ -3434,12 +3436,14 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) { + } + len += l; + NEXTL(l); ++ end = ctxt->input->cur; + c = CUR_CHAR(l); + if (c == 0) { + count = 0; + GROW; + if (ctxt->instate == XML_PARSER_EOF) + return(NULL); ++ end = ctxt->input->cur; + c = CUR_CHAR(l); + } + } +@@ -3448,7 +3452,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) { + xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName"); + return(NULL); + } +- return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len)); ++ return(xmlDictLookup(ctxt->dict, end - len, len)); + } + + /** diff --git a/debian/patches/series b/debian/patches/series index d300eac..877bddb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,6 @@ 0001-modify-xml2-config-and-pkgconfig-behaviour.patch +0002-Fix-an-error-in-xmlCleanupParser.patch +0003-Fix-missing-break-on-last-function-for-attributes.patch +0004-xmllint-memory-should-fail-on-empty-files.patch +0005-properly-quote-the-namespace-uris-written-out-during.patch +0006-Fix-a-parsing-bug-on-non-ascii-element-and-CR-LF-usa.patch |