summaryrefslogtreecommitdiff
path: root/debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-10-19 15:39:54 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-10-19 15:39:54 +0300
commit76d018a8af27653c40229684724c185830b1c482 (patch)
tree4765d32bae0948b8e929564d6eba54de1675b7a3 /debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch
parent5beef1c7a526e014a37ca8a422911e574d3e6951 (diff)
parent76c19f4d5b3328c05649314336d27c1f44a49e96 (diff)
downloadlibxml2-76d018a8af27653c40229684724c185830b1c482.tar.gz
Merge branch 'master' of git://anonscm.debian.org/debian-xml-sgml/libxml2
Diffstat (limited to 'debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch')
-rw-r--r--debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch b/debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch
new file mode 100644
index 0000000..386ab1e
--- /dev/null
+++ b/debian/patches/0011-Do-not-process-encoding-values-if-the-declaration-if.patch
@@ -0,0 +1,34 @@
+From: Daniel Veillard <veillard@redhat.com>
+Date: Mon, 29 Jun 2015 09:08:25 +0800
+Subject: Do not process encoding values if the declaration if broken
+
+For https://bugzilla.gnome.org/show_bug.cgi?id=751603
+
+If the string is not properly terminated do not try to convert
+to the given encoding.
+---
+ parser.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/parser.c b/parser.c
+index fe603ac..a3a9568 100644
+--- a/parser.c
++++ b/parser.c
+@@ -10404,6 +10404,8 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
+ encoding = xmlParseEncName(ctxt);
+ if (RAW != '"') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
++ xmlFree((xmlChar *) encoding);
++ return(NULL);
+ } else
+ NEXT;
+ } else if (RAW == '\''){
+@@ -10411,6 +10413,8 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
+ encoding = xmlParseEncName(ctxt);
+ if (RAW != '\'') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
++ xmlFree((xmlChar *) encoding);
++ return(NULL);
+ } else
+ NEXT;
+ } else {