aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2014-12-11 16:59:28 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2014-12-11 16:59:28 +0000
commit02508190e44cf9334e41b7a1bf1b21bd0b80ed4f (patch)
treeb37869065e7990d60df65fe039d87213ec1c8d61
parent4f14f4634f5f9e7214d577124664fa8d02079428 (diff)
- add patch to prevent buffer overflow
- bump PORTREVISION PR: 195558 Submitted by: fk@fabiankeil.de
Notes
Notes: svn path=/head/; revision=374539
-rw-r--r--textproc/antiword/Makefile12
-rw-r--r--textproc/antiword/files/patch-wordole.c14
-rw-r--r--textproc/antiword/pkg-plist1
3 files changed, 25 insertions, 2 deletions
diff --git a/textproc/antiword/Makefile b/textproc/antiword/Makefile
index 7f0ad92efe9a..bf0f9e2d3768 100644
--- a/textproc/antiword/Makefile
+++ b/textproc/antiword/Makefile
@@ -3,13 +3,15 @@
PORTNAME= antiword
PORTVERSION= 0.37
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= textproc
MASTER_SITES= http://www.winfield.demon.nl/linux/
MAINTAINER= leeym@FreeBSD.org
COMMENT= Application for displaying Microsoft(R) Word documents
+OPTIONS_DEFINE= DEBUG
+
LICENSE= GPLv2
BUILD_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/n022003l.afm:${PORTSDIR}/print/gsfonts
@@ -24,11 +26,17 @@ INSTALL_TARGET= global_install
PORTDOCS= COPYING ChangeLog Emacs Exmh FAQ History Mozilla Mutt Netscape \
QandA ReadMe antiword.1 antiword.man antiword.php testdoc.doc
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+CFLAGS+= -DDEBUG
+.else
CFLAGS+= -DNDEBUG
+.endif
post-patch:
@${REINPLACE_CMD} -E 's,/usr/share,${LOCALBASE}/share,g; s,fonts2,fonts,' ${WRKSRC}/Unix-only/fontinfo.pl
- @${REINPLACE_CMD} -E 's|LD|CC|g; /^(CC|CFLAGS)/d; s,/usr/share,${PREFIX}/share,g; s|/usr/local/bin|${PREFIX}/bin|g' ${WRKSRC}/${MAKEFILE}
+ @${REINPLACE_CMD} -E 's|LD|CC|g; /^(CC|CFLAGS|OPT)/d; s,/usr/share,${PREFIX}/share,g; s|/usr/local/bin|${PREFIX}/bin|g' ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -E 's,/usr/share,${PREFIX}/share,g' ${WRKSRC}/antiword.h
post-install:
diff --git a/textproc/antiword/files/patch-wordole.c b/textproc/antiword/files/patch-wordole.c
new file mode 100644
index 000000000000..f3ecae43ba92
--- /dev/null
+++ b/textproc/antiword/files/patch-wordole.c
@@ -0,0 +1,14 @@
+--- wordole.c
++++ wordole.c
+@@ -259,6 +259,11 @@ bGetPPS(FILE *pFile,
+ }
+ tNameSize = (size_t)usGetWord(0x40, aucBytes);
+ tNameSize = (tNameSize + 1) / 2;
++ if (tNameSize >= sizeof(atPPSlist[0].szName)) {
++ werr(0, "PPS %d appears to be invalid.", iIndex);
++ atPPSlist = xfree(atPPSlist);
++ return FALSE;
++ }
+ vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
+ atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
+ if (atPPSlist[iIndex].ucType == 5) {
diff --git a/textproc/antiword/pkg-plist b/textproc/antiword/pkg-plist
index 8a894b82a7c1..9a76ffd8942a 100644
--- a/textproc/antiword/pkg-plist
+++ b/textproc/antiword/pkg-plist
@@ -32,3 +32,4 @@ man/man1/antiword.1.gz
%%DATADIR%%/koi8-r.txt
%%DATADIR%%/koi8-u.txt
%%DATADIR%%/roman.txt
+@dirrmtry %%DATADIR%%