[arch-commits] Commit in antiword/trunk (4 files)

Lukas Fleischer lfleischer at archlinux.org
Wed Dec 3 23:09:49 UTC 2014


    Date: Thursday, December 4, 2014 @ 00:09:49
  Author: lfleischer
Revision: 123424

upgpkg: antiword 0.37-5

* Add Debian patch to fix FS#42982, CVE-2014-8123.
* Remove antiword-helper and .install message.
* PKGBUILD cleanup.

Added:
  antiword/trunk/10_fix_buffer_overflow_wordole_c.patch
Modified:
  antiword/trunk/PKGBUILD
Deleted:
  antiword/trunk/antiword-helper
  antiword/trunk/antiword.install

----------------------------------------+
 10_fix_buffer_overflow_wordole_c.patch |   18 ++++++++++++++++++
 PKGBUILD                               |   28 +++++++++++++++-------------
 antiword-helper                        |   13 -------------
 antiword.install                       |   16 ----------------
 4 files changed, 33 insertions(+), 42 deletions(-)

Added: 10_fix_buffer_overflow_wordole_c.patch
===================================================================
--- 10_fix_buffer_overflow_wordole_c.patch	                        (rev 0)
+++ 10_fix_buffer_overflow_wordole_c.patch	2014-12-03 23:09:49 UTC (rev 123424)
@@ -0,0 +1,18 @@
+Description: Add check for buffer overflow with malformed input files
+Author: <eriks at debian.org>
+Bug-Debian: http://bugs.debian.org/407015
+Last-Update: 2009-06-03
+
+--- antiword-0.37~/wordole.c	2005-08-26 21:49:57.000000000 +0200
++++ antiword-0.37/wordole.c	2009-06-03 22:31:15.948014682 +0200
+@@ -259,6 +259,10 @@
+ 		}
+ 		tNameSize = (size_t)usGetWord(0x40, aucBytes);
+ 		tNameSize = (tNameSize + 1) / 2;
++		if ( tNameSize > sizeof(atPPSlist[iIndex].szName)) {
++			werr(0, "Name Size of PPS %d is too large", iIndex);
++			tNameSize = sizeof(atPPSlist[iIndex].szName);
++		}
+ 		vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
+ 		atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
+ 		if (atPPSlist[iIndex].ucType == 5) {

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-12-03 22:05:06 UTC (rev 123423)
+++ PKGBUILD	2014-12-03 23:09:49 UTC (rev 123424)
@@ -5,30 +5,32 @@
 
 pkgname=antiword
 pkgver=0.37
-pkgrel=4
+pkgrel=5
 pkgdesc="A free MS Word reader for Linux and RISC OS"
 arch=('i686' 'x86_64')
 url="http://www.winfield.demon.nl/"
 license=('GPL')
 depends=('bash')
-install=antiword.install
 source=("http://www.winfield.demon.nl/linux/$pkgname-$pkgver.tar.gz"
-        'antiword-helper')
+        '10_fix_buffer_overflow_wordole_c.patch')
 md5sums=('f868e2a269edcbc06bf77e89a55898d1'
-         '01a988376cfd4bb268120ab597c9abe3')
+         '3eb02e9d913b355d64d9a30b08fc390f')
 
-build(){
-  cd "${srcdir}"/$pkgname-$pkgver
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+  patch -p1 -i ../10_fix_buffer_overflow_wordole_c.patch
+}
 
-  sed -i "s|GLOBAL_INSTALL_DIR =.*|GLOBAL_INSTALL_DIR = /usr/bin|g" \
-    Makefile.Linux
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
 
-  make OPT="${CFLAGS} -DNDEBUG" LDFLAGS="${LDFLAGS}"
+  sed -i "s|GLOBAL_INSTALL_DIR =.*|GLOBAL_INSTALL_DIR = /usr/bin|g" Makefile.Linux
+  make OPT="$CFLAGS -DNDEBUG" LDFLAGS="$LDFLAGS"
 }
 
 package() {
-  cd "${srcdir}"/$pkgname-$pkgver
-  make DESTDIR="${pkgdir}" global_install
-  install -m755 $srcdir/antiword-helper $pkgdir/usr/bin/
-  install -Dm644 Docs/antiword.1 $pkgdir/usr/share/man/man1/antiword.1
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" global_install
+  install -Dm644 Docs/antiword.1 "$pkgdir/usr/share/man/man1/antiword.1"
 }

Deleted: antiword-helper
===================================================================
--- antiword-helper	2014-12-03 22:05:06 UTC (rev 123423)
+++ antiword-helper	2014-12-03 23:09:49 UTC (rev 123424)
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-[ $# -eq 2 ] || exit 1
-
-tmpfile=/tmp/aw$$.txt
-editor=${EDITOR:-`which vi`}
-terminal="$2"
-
-antiword "$1" > $tmpfile
-chmod -w $tmpfile
-$terminal -e $editor $tmpfile
-chmod +w $tmpfile
-rm $tmpfile

Deleted: antiword.install
===================================================================
--- antiword.install	2014-12-03 22:05:06 UTC (rev 123423)
+++ antiword.install	2014-12-03 23:09:49 UTC (rev 123424)
@@ -1,16 +0,0 @@
-post_install() {
-  cat << EOF
-NOTES On Antiword Integration:
-
-* If you use mozplugger, make sure to configure the
-  msword section like so (replacing <TERMINAL> with your
-  terminal of choice):
-      application/msword: doc, dot: Microsoft Word Document
-                ignore_errors exits: antiword-helper <TERMINAL> "$file"
-
-* To properly use antiword in your mailcap settings:
-      application/msword; antiword %s; copiousoutput
-
-* To enable drag-and-drop support in KDE, use the kantiword script
-EOF
-}



More information about the arch-commits mailing list