summaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2005-01-23 11:21:07 +0000
committerale <ale@FreeBSD.org>2005-01-23 11:21:07 +0000
commit86f7c9be00702f57d77af9a5effe58d7798714f5 (patch)
tree5298fe83e54dd7dca17878d7721f955f5ea10ae7 /print
parenta6865a2ed3629815989b9131dec2af393b19d2f0 (diff)
downloadFreeBSD-ports-86f7c9be00702f57d77af9a5effe58d7798714f5.zip
FreeBSD-ports-86f7c9be00702f57d77af9a5effe58d7798714f5.tar.gz
- Fix tiff vulnerability
- Fix pdf generation on 64bit architectures [1] PR: ports/76385 [1] Submitted by: UEMURA Tetsuya <t_uemura@macome.co.jp> [1]
Diffstat (limited to 'print')
-rw-r--r--print/pdflib/Makefile10
-rw-r--r--print/pdflib/files/patch-libs::tiff::tif_dirread.c11
-rw-r--r--print/pdflib/files/patch-libs::tiff::tif_fax3.c11
3 files changed, 29 insertions, 3 deletions
diff --git a/print/pdflib/Makefile b/print/pdflib/Makefile
index a09ab8f..3386004 100644
--- a/print/pdflib/Makefile
+++ b/print/pdflib/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pdflib
PORTVERSION= 6.0.1
+PORTREVISION= 1
CATEGORIES= print
MASTER_SITES= http://www.pdflib.com/products/pdflib/download/${PORTVERSION:S/.//g}src/
DISTNAME= PDFlib-Lite-${PORTVERSION}
@@ -14,8 +15,6 @@ DISTNAME= PDFlib-Lite-${PORTVERSION}
MAINTAINER= ale@FreeBSD.org
COMMENT= A C library for dynamically generating PDF
-FORBIDDEN= http://vuxml.freebsd.org/fc7e6a42-6012-11d9-a9e7-0001020eed82.html
-
RESTRICTED= "many odd restrictions on usage and distribution"
INSTALLS_SHLIB= yes
@@ -41,6 +40,11 @@ PLIST_SUB= PERL="@comment "
PORTDOCS= *
.endif
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
+CONFIGURE_ARGS+=--enable-64bit
+.endif
post-patch:
@${REINPLACE_CMD} -e "s|\(PDFLIB_LTCURRENT\)=5|\1=7|g" ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's^\$$(top_builddir)/libtool^${LIBTOOL}^' ${WRKSRC}/config/mkcommon.inc.in
@@ -53,4 +57,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/pdflib/* ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/print/pdflib/files/patch-libs::tiff::tif_dirread.c b/print/pdflib/files/patch-libs::tiff::tif_dirread.c
new file mode 100644
index 0000000..00b5f9b
--- /dev/null
+++ b/print/pdflib/files/patch-libs::tiff::tif_dirread.c
@@ -0,0 +1,11 @@
+--- libs/tiff/tif_dirread.c.orig Sun Jan 23 12:04:30 2005
++++ libs/tiff/tif_dirread.c Sun Jan 23 12:05:30 2005
+@@ -69,7 +69,7 @@
+ char *cp = NULL;
+ tsize_t bytes = nmemb * elem_size;
+
+- if (elem_size && bytes / elem_size == nmemb)
++ if (nmemb && elem_size && bytes / elem_size == nmemb)
+ cp = (char*)_TIFFmalloc(tif, bytes);
+
+ if (cp == NULL)
diff --git a/print/pdflib/files/patch-libs::tiff::tif_fax3.c b/print/pdflib/files/patch-libs::tiff::tif_fax3.c
new file mode 100644
index 0000000..7e4b372
--- /dev/null
+++ b/print/pdflib/files/patch-libs::tiff::tif_fax3.c
@@ -0,0 +1,11 @@
+--- libs/tiff/tif_fax3.c.orig Sun Jan 23 12:05:49 2005
++++ libs/tiff/tif_fax3.c Sun Jan 23 12:06:35 2005
+@@ -445,7 +445,7 @@
+ char *cp = NULL;
+ tsize_t bytes = nmemb * elem_size;
+
+- if (elem_size && bytes / elem_size == nmemb)
++ if (nmemb && elem_size && bytes / elem_size == nmemb)
+ cp = (char*) _TIFFmalloc(tif, bytes);
+
+ if (cp == NULL)
OpenPOWER on IntegriCloud