summaryrefslogtreecommitdiff
path: root/core/expat
diff options
context:
space:
mode:
Diffstat (limited to 'core/expat')
-rw-r--r--core/expat/CVE-2009-3560.patch13
-rw-r--r--core/expat/CVE-2009-3720.patch12
-rw-r--r--core/expat/PKGBUILD33
3 files changed, 58 insertions, 0 deletions
diff --git a/core/expat/CVE-2009-3560.patch b/core/expat/CVE-2009-3560.patch
new file mode 100644
index 000000000..5fe9c36c8
--- /dev/null
+++ b/core/expat/CVE-2009-3560.patch
@@ -0,0 +1,13 @@
+diff -urNad trunk~/lib/xmlparse.c trunk/lib/xmlparse.c
+--- trunk~/lib/xmlparse.c 2007-05-08 04:25:35.000000000 +0200
++++ trunk/lib/xmlparse.c 2009-12-29 21:57:22.141732904 +0100
+@@ -3703,6 +3703,9 @@
+ return XML_ERROR_UNCLOSED_TOKEN;
+ case XML_TOK_PARTIAL_CHAR:
+ return XML_ERROR_PARTIAL_CHAR;
++ case -XML_TOK_PROLOG_S:
++ tok = -tok;
++ break;
+ case XML_TOK_NONE:
+ #ifdef XML_DTD
+ /* for internal PE NOT referenced between declarations */
diff --git a/core/expat/CVE-2009-3720.patch b/core/expat/CVE-2009-3720.patch
new file mode 100644
index 000000000..65d16431f
--- /dev/null
+++ b/core/expat/CVE-2009-3720.patch
@@ -0,0 +1,12 @@
+diff -urNad trunk~/lib/xmltok_impl.c trunk/lib/xmltok_impl.c
+--- trunk~/lib/xmltok_impl.c 2006-11-26 18:34:46.000000000 +0100
++++ trunk/lib/xmltok_impl.c 2009-10-22 21:42:41.000000000 +0200
+@@ -1744,7 +1744,7 @@
+ const char *end,
+ POSITION *pos)
+ {
+- while (ptr != end) {
++ while (ptr < end) {
+ switch (BYTE_TYPE(enc, ptr)) {
+ #define LEAD_CASE(n) \
+ case BT_LEAD ## n: \
diff --git a/core/expat/PKGBUILD b/core/expat/PKGBUILD
new file mode 100644
index 000000000..9daf035ad
--- /dev/null
+++ b/core/expat/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 102953 2010-12-13 13:44:48Z stephane $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Committer: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=expat
+pkgver=2.0.1
+pkgrel=6
+pkgdesc="An XML parser library"
+arch=('i686' 'x86_64')
+url="http://expat.sourceforge.net"
+license=('custom')
+depends=('glibc')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/expat/${pkgname}-${pkgver}.tar.gz
+ CVE-2009-3560.patch
+ CVE-2009-3720.patch)
+md5sums=('ee8b492592568805593f81f8cdf2a04c'
+ '50603cac0f03aabc7087415251f592be'
+ 'f3eeb796f28945899216b815e5901996')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i $srcdir/CVE-2009-3560.patch
+ patch -Np1 -i $srcdir/CVE-2009-3720.patch
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}