diff -r 15f87c23a86e -r c33a34e65bdb components/libxml2/patches/10.CVE-2011-0216.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/libxml2/patches/10.CVE-2011-0216.patch Wed Dec 14 10:40:21 2011 -0800 @@ -0,0 +1,22 @@ +This patch taken directly from upstream: +http://git.gnome.org/browse/libxml2/commit/?id=69f04562f75212bfcabecd190ea8b06ace28ece2 +--- libxml2-2.7.6/encoding.c Thu Sep 24 08:31:59 2009 ++++ libxml2-2.7.6/new.encoding.c Mon Oct 24 11:11:46 2011 +@@ -1771,7 +1771,7 @@ + if (in == NULL) return(-1); + + /* calculate space available */ +- written = out->size - out->use; ++ written = out->size - out->use - 1; /* count '\0' */ + toconv = in->use; + /* + * echo '' | wc -c => 38 +@@ -1892,7 +1892,7 @@ + toconv = in->use; + if (toconv == 0) + return (0); +- written = out->size - out->use; ++ written = out->size - out->use - 1; /* count '\0' */ + if (toconv * 2 >= written) { + xmlBufferGrow(out, out->size + toconv * 2); + written = out->size - out->use - 1;