diff options
Diffstat (limited to 'print')
-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 33860040cc81..706e915b2eb6 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 00b5f9bc930a..b59744f1beca 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\"", |