summaryrefslogtreecommitdiffstats
path: root/main/ghostscript/CVE-2012-4405.patch
blob: a589992aee040d29a15e3fd2af2f913baa83dcd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- ./icclib/icc.c.orig
+++ ./icclib/icc.c
@@ -4996,6 +4996,11 @@
         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;