Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 9534b88d0a43e6114f1bac9f39d5c33b > files > 9

ghostscript-8.70-15.el5_9.3.src.rpm

diff -up ghostscript-8.70/icclib/icc.c.CVE-2012-4405 ghostscript-8.70/icclib/icc.c
--- ghostscript-8.70/icclib/icc.c.CVE-2012-4405	2009-07-28 08:48:19.000000000 +0100
+++ ghostscript-8.70/icclib/icc.c	2012-09-05 11:43:56.577728357 +0100
@@ -5006,6 +5006,11 @@ static int icmLut_read(
 	p->clutPoints = read_UInt8Number(bp+10);
 
 	/* Sanity check */
+        if (p->inputChan < 1) {
+		sprintf(icp->err,"icmLut_read: No input channels!");
+		return icp->errc = 1;
+	}
+
 	if (p->inputChan > MAX_CHAN) {
 		sprintf(icp->err,"icmLut_read: Can't handle > %d input channels\n",MAX_CHAN);
 		return icp->errc = 1;