author | Allan McRae
<allan@archlinux.org> 2009-01-21 11:22:36 UTC |
committer | Allan McRae
<allan@archlinux.org> 2009-01-21 11:22:36 UTC |
parent | b55591fead1761c23eafb59cb4f389d51f5c6abb |
PKGBUILD | +15 | -7 |
libmikmod-CVE-2007-6720.patch | +39 | -0 |
libmikmod.install | +18 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 30c51f2..297e0a0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,21 +1,29 @@ -# Maintainer: arjan <arjan@archlinux.org> +# Maintainer: Allan McRae <allan@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> + pkgname=libmikmod pkgver=3.1.12 -pkgrel=1 +pkgrel=2 pkgdesc="A portable sound library" license=('GPL' 'LGPL') url="http://sourceforge.net/projects/mikmod/" arch=('i686' 'x86_64') depends=('glibc') -source=(http://downloads.sourceforge.net/mikmod/${pkgname}-${pkgver}.tar.gz) -md5sums=('9f3c740298260d5f88981fc0d51f6f16') options=('!libtool') +install=$pkgname.install +source=(http://downloads.sourceforge.net/mikmod/${pkgname}-${pkgver}.tar.gz + libmikmod-CVE-2007-6720.patch) +md5sums=('9f3c740298260d5f88981fc0d51f6f16' + '0c1c21b3d04bfe0b917b60ad11b00e57') build() { - cd $startdir/src/$pkgname-$pkgver - missing_dir="`pwd`" ./configure --prefix=/usr + cd $srcdir/$pkgname-$pkgver + patch -Np1 -i $srcdir/libmikmod-CVE-2007-6720.patch + ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info make || return 1 - make DESTDIR=$startdir/pkg install + make DESTDIR=$pkgdir install + + rm $pkgdir/usr/share/info/dir + gzip -9 $pkgdir/usr/share/info/mikmod.info } diff --git a/libmikmod-CVE-2007-6720.patch b/libmikmod-CVE-2007-6720.patch new file mode 100644 index 0000000..01c6d08 --- /dev/null +++ b/libmikmod-CVE-2007-6720.patch @@ -0,0 +1,39 @@ +diff -Naur libmikmod-3.1.12-old/playercode/mplayer.c libmikmod-3.1.12/playercode/mplayer.c +--- libmikmod-3.1.12-old/playercode/mplayer.c 2007-12-15 19:26:28.000000000 +1000 ++++ libmikmod-3.1.12/playercode/mplayer.c 2009-01-21 18:53:59.000000000 +1000 +@@ -2318,7 +2318,7 @@ + SAMPLE *s; + + mod->totalchn=mod->realchn=0; +- for (channel=0;channel<md_sngchn;channel++) { ++ for (channel=0;channel<pf->numchn;channel++) { + aout=&mod->voice[channel]; + i=aout->main.i; + s=aout->main.s; +@@ -3086,7 +3086,7 @@ + pf->patbrk=0; + pf->vbtick=pf->sngspd; + +- for (t=0;t<md_sngchn;t++) { ++ for (t=0;t<pf->numchn;t++) { + Voice_Stop_internal(t); + pf->voice[t].main.i=NULL; + pf->voice[t].main.s=NULL; +@@ -3111,7 +3111,7 @@ + pf->patbrk=0; + pf->vbtick=pf->sngspd; + +- for (t=0;t<md_sngchn;t++) { ++ for (t=0;t<pf->numchn;t++) { + Voice_Stop_internal(t); + pf->voice[t].main.i=NULL; + pf->voice[t].main.s=NULL; +@@ -3138,7 +3138,7 @@ + pf->sngpos=pos; + pf->vbtick=pf->sngspd; + +- for (t=0;t<md_sngchn;t++) { ++ for (t=0;t<pf->numchn;t++) { + Voice_Stop_internal(t); + pf->voice[t].main.i=NULL; + pf->voice[t].main.s=NULL; diff --git a/libmikmod.install b/libmikmod.install new file mode 100644 index 0000000..7f80054 --- /dev/null +++ b/libmikmod.install @@ -0,0 +1,18 @@ +infodir=/usr/share/info +filelist=(mikmod.info) + +post_install() { + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +}