aboutsummaryrefslogtreecommitdiff
path: root/print/cups-base
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2008-08-12 14:21:12 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2008-08-12 14:21:12 +0000
commit9117dc5853c5927ae8d2c7bc4755f1418ef53c07 (patch)
tree822a5579264bc22f41b6db284361f203b01dd618 /print/cups-base
parentee676a7808080961ff84632a9747b772211d63cd (diff)
downloadports-9117dc5853c5927ae8d2c7bc4755f1418ef53c07.tar.gz
ports-9117dc5853c5927ae8d2c7bc4755f1418ef53c07.zip
Notes
Diffstat (limited to 'print/cups-base')
-rw-r--r--print/cups-base/Makefile2
-rw-r--r--print/cups-base/files/patch-str279072
2 files changed, 73 insertions, 1 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile
index 6c2a539d7022..e593adbd7ca6 100644
--- a/print/cups-base/Makefile
+++ b/print/cups-base/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cups
PORTVERSION= 1.3.7
-PORTREVISION= 3
+PORTREVISION= 4
DISTVERSIONSUFFIX= -source
CATEGORIES= print
MASTER_SITES= EASYSW/${PORTNAME}/${DISTVERSION}
diff --git a/print/cups-base/files/patch-str2790 b/print/cups-base/files/patch-str2790
new file mode 100644
index 000000000000..107b0fa95c1b
--- /dev/null
+++ b/print/cups-base/files/patch-str2790
@@ -0,0 +1,72 @@
+Index: image-png.c
+===================================================================
+--- filter/image-png.c (revision 7434)
++++ filter/image-png.c (working copy)
+@@ -3,7 +3,7 @@
+ *
+ * PNG image routines for the Common UNIX Printing System (CUPS).
+ *
+- * Copyright 2007 by Apple Inc.
++ * Copyright 2007-2008 by Apple Inc.
+ * Copyright 1993-2007 by Easy Software Products.
+ *
+ * These coded instructions, statements, and computer programs are the
+@@ -170,16 +170,56 @@
+ * Interlaced images must be loaded all at once...
+ */
+
++ size_t bufsize; /* Size of buffer */
++
++
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+- in = malloc(img->xsize * img->ysize);
++ {
++ bufsize = img->xsize * img->ysize;
++
++ if ((bufsize / img->ysize) != img->xsize)
++ {
++ fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
++ (unsigned)width, (unsigned)height);
++ fclose(fp);
++ return (1);
++ }
++ }
+ else
+- in = malloc(img->xsize * img->ysize * 3);
++ {
++ bufsize = img->xsize * img->ysize * 3;
++
++ if ((bufsize / (img->ysize * 3)) != img->xsize)
++ {
++ fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
++ (unsigned)width, (unsigned)height);
++ fclose(fp);
++ return (1);
++ }
++ }
++
++ in = malloc(bufsize);
+ }
+
+ bpp = cupsImageGetDepth(img);
+ out = malloc(img->xsize * bpp);
+
++ if (!in || !out)
++ {
++ fputs("DEBUG: Unable to allocate memory for PNG image!\n", stderr);
++
++ if (in)
++ free(in);
++
++ if (out)
++ free(out);
++
++ fclose(fp);
++
++ return (1);
++ }
++
+ /*
+ * Read the image, interlacing as needed...
+ */