aports/main/ghostscript/CVE-2012-4405.patch
2012-11-05 14:57:31 +00:00

16 lines
434 B
Diff

--- ./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;