summaryrefslogtreecommitdiff
path: root/print/teTeX-bin/patches/patch-ah
blob: 0fb3b54e85868d56a54d3467e92f3ffc8eda7bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-ah,v 1.3 2005/01/16 08:35:08 kei Exp $

--- libs/xpdf/xpdf/Gfx.cc.orig	2005-01-04 16:23:02.000000000 +0900
+++ libs/xpdf/xpdf/Gfx.cc	2005-01-04 16:27:39.000000000 +0900
@@ -2381,7 +2381,9 @@
     haveMask = gFalse;
     dict->lookup("Mask", &maskObj);
     if (maskObj.isArray()) {
-      for (i = 0; i < maskObj.arrayGetLength(); ++i) {
+      for (i = 0;
+	   i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps;
+	   ++i) {
 	maskObj.arrayGet(i, &obj1);
 	maskColors[i] = obj1.getInt();
 	obj1.free();