diff options
author | lawrance <lawrance@FreeBSD.org> | 2005-07-31 15:49:11 +0000 |
---|---|---|
committer | lawrance <lawrance@FreeBSD.org> | 2005-07-31 15:49:11 +0000 |
commit | 567d9e31ef5821336812ee8f04ad57707ca14001 (patch) | |
tree | ad189207a1ac28d065fa8a7cb4e6c627ba52778c | |
parent | 0a175a348af922b8c4cbc19311bcf5de27848b2a (diff) | |
download | FreeBSD-ports-567d9e31ef5821336812ee8f04ad57707ca14001.zip FreeBSD-ports-567d9e31ef5821336812ee8f04ad57707ca14001.tar.gz |
Fix a vulnerability in libtiff embedded in this port.
Bump PORTREVISION.
Approved by: ale (maintainer) is away
Obtained from: libtiff CVS http://www.remotesensing.org/libtiff/
Security: http://vuxml.FreeBSD.org/68222076-010b-11da-bc08-0001020eed82.html
CAN-2005-1544
-rw-r--r-- | print/pdflib/Makefile | 2 | ||||
-rw-r--r-- | print/pdflib/files/patch-libs::tiff::tif_dirread.c | 44 |
2 files changed, 43 insertions, 3 deletions
diff --git a/print/pdflib/Makefile b/print/pdflib/Makefile index 3386004..706e915 100644 --- a/print/pdflib/Makefile +++ b/print/pdflib/Makefile @@ -7,7 +7,7 @@ PORTNAME= pdflib PORTVERSION= 6.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= print MASTER_SITES= http://www.pdflib.com/products/pdflib/download/${PORTVERSION:S/.//g}src/ DISTNAME= PDFlib-Lite-${PORTVERSION} diff --git a/print/pdflib/files/patch-libs::tiff::tif_dirread.c b/print/pdflib/files/patch-libs::tiff::tif_dirread.c index 00b5f9b..b59744f 100644 --- a/print/pdflib/files/patch-libs::tiff::tif_dirread.c +++ b/print/pdflib/files/patch-libs::tiff::tif_dirread.c @@ -1,5 +1,5 @@ ---- 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 +--- libs/tiff/tif_dirread.c.orig Fri Nov 26 21:39:06 2004 ++++ libs/tiff/tif_dirread.c Mon Aug 1 01:06:34 2005 @@ -69,7 +69,7 @@ char *cp = NULL; tsize_t bytes = nmemb * elem_size; @@ -9,3 +9,43 @@ cp = (char*)_TIFFmalloc(tif, bytes); if (cp == NULL) +@@ -1267,12 +1267,16 @@ + uint16 buf[10]; + uint16* v = buf; + +- if (samples > (int)NITEMS(buf)) +- v = (uint16*) CheckMalloc(tif, samples, sizeof (uint16), ++ if (dir->tdir_count > (int)NITEMS(buf)) ++ v = (uint16*) CheckMalloc(tif, dir->tdir_count, sizeof (uint16), + "to fetch per-sample values"); + if (v && TIFFFetchShortArray(tif, dir, v)) { + int i; +- for (i = 1; i < samples; i++) ++ int check_count = dir->tdir_count; ++ if( samples < check_count ) ++ check_count = samples; ++ ++ for (i = 1; i < check_count; i++) + if (v[i] != v[0]) { + TIFFError(tif->tif_name, + "Cannot handle different per-sample values for field \"%s\"", +@@ -1304,12 +1308,16 @@ + double buf[10]; + double* v = buf; + +- if (samples > (int)NITEMS(buf)) +- v = (double*) CheckMalloc(tif, samples, sizeof (double), ++ if (dir->tdir_count > (int)NITEMS(buf)) ++ v = (double*) CheckMalloc(tif, dir->tdir_count, sizeof (double), + "to fetch per-sample values"); + if (v && TIFFFetchAnyArray(tif, dir, v)) { + int i; +- for (i = 1; i < samples; i++) ++ int check_count = dir->tdir_count; ++ if( samples < check_count ) ++ check_count = samples; ++ ++ for (i = 1; i < check_count; i++) + if (v[i] != v[0]) { + TIFFError(tif->tif_name, + "Cannot handle different per-sample values for field \"%s\"", |