View | Details | Raw Unified | Return to bug 195558
Collapse All | Expand All

(-)b/textproc/antiword/Makefile (-2 / +10 lines)
Lines 3-15 Link Here
3
3
4
PORTNAME=	antiword
4
PORTNAME=	antiword
5
PORTVERSION=	0.37
5
PORTVERSION=	0.37
6
PORTREVISION=	3
6
PORTREVISION=	4
7
CATEGORIES=	textproc
7
CATEGORIES=	textproc
8
MASTER_SITES=	http://www.winfield.demon.nl/linux/
8
MASTER_SITES=	http://www.winfield.demon.nl/linux/
9
9
10
MAINTAINER=	leeym@FreeBSD.org
10
MAINTAINER=	leeym@FreeBSD.org
11
COMMENT=	Application for displaying Microsoft(R) Word documents
11
COMMENT=	Application for displaying Microsoft(R) Word documents
12
12
13
OPTIONS_DEFINE=	DEBUG
14
13
LICENSE=	GPLv2
15
LICENSE=	GPLv2
14
16
15
BUILD_DEPENDS=	${LOCALBASE}/share/ghostscript/fonts/n022003l.afm:${PORTSDIR}/print/gsfonts
17
BUILD_DEPENDS=	${LOCALBASE}/share/ghostscript/fonts/n022003l.afm:${PORTSDIR}/print/gsfonts
Lines 24-34 INSTALL_TARGET= global_install Link Here
24
PORTDOCS=	COPYING ChangeLog Emacs Exmh FAQ History Mozilla Mutt Netscape \
26
PORTDOCS=	COPYING ChangeLog Emacs Exmh FAQ History Mozilla Mutt Netscape \
25
		QandA ReadMe antiword.1 antiword.man antiword.php testdoc.doc
27
		QandA ReadMe antiword.1 antiword.man antiword.php testdoc.doc
26
28
29
.include <bsd.port.options.mk>
30
31
.if ${PORT_OPTIONS:MDEBUG}
32
CFLAGS+=	-DDEBUG
33
.else
27
CFLAGS+=	-DNDEBUG
34
CFLAGS+=	-DNDEBUG
35
.endif
28
36
29
post-patch:
37
post-patch:
30
	@${REINPLACE_CMD} -E 's,/usr/share,${LOCALBASE}/share,g; s,fonts2,fonts,' ${WRKSRC}/Unix-only/fontinfo.pl
38
	@${REINPLACE_CMD} -E 's,/usr/share,${LOCALBASE}/share,g; s,fonts2,fonts,' ${WRKSRC}/Unix-only/fontinfo.pl
31
	@${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}
39
	@${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}
32
	@${REINPLACE_CMD} -E 's,/usr/share,${PREFIX}/share,g' ${WRKSRC}/antiword.h
40
	@${REINPLACE_CMD} -E 's,/usr/share,${PREFIX}/share,g' ${WRKSRC}/antiword.h
33
41
34
post-install:
42
post-install:
(-)b/textproc/antiword/files/patch-wordole.c (-1 / +28 lines)
Added Link Here
0
- 
1
From a17e48746d7203f91a2c3bb1cdcbe9023c8d37a0 Mon Sep 17 00:00:00 2001
2
From: Fabian Keil <fk@fabiankeil.de>
3
Date: Tue, 25 Nov 2014 18:58:52 +0100
4
Subject: [PATCH] bGetPPS(): Prevent overflow of atPPSlist[].szName[]
5
6
---
7
 wordole.c | 5 +++++
8
 1 file changed, 5 insertions(+)
9
10
diff --git a/wordole.c b/wordole.c
11
index 8a95fb9..7797d1f 100644
12
--- wordole.c
13
+++ wordole.c
14
@@ -259,6 +259,11 @@ bGetPPS(FILE *pFile,
15
 		}
16
 		tNameSize = (size_t)usGetWord(0x40, aucBytes);
17
 		tNameSize = (tNameSize + 1) / 2;
18
+		if (tNameSize >= sizeof(atPPSlist[0].szName)) {
19
+			werr(0, "PPS %d appears to be invalid.", iIndex);
20
+			atPPSlist = xfree(atPPSlist);
21
+			return FALSE;
22
+		}
23
 		vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
24
 		atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
25
 		if (atPPSlist[iIndex].ucType == 5) {
26
-- 
27
2.1.2
28

Return to bug 195558