summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2011-09-11 22:30:28 +0200
committerAlbert Astals Cid <aacid@kde.org>2011-09-11 22:30:28 +0200
commit8adb9d15d6bad2a2cf053f0e03dbba6059f9aecc (patch)
tree9bfdc8482cd7e086d438b57f6512652f15b39e6d
parentc3f2568f38f9649db77a366170822d182421b910 (diff)
GfxCalRGBColorSpace::parse does not need recursion nor the extra check
-rw-r--r--ALL_DIFF24
1 files changed, 1 insertions, 23 deletions
diff --git a/ALL_DIFF b/ALL_DIFF
index ba091a7..f55e68e 100644
--- a/ALL_DIFF
+++ b/ALL_DIFF
@@ -11619,8 +11619,7 @@ diff -ru xpdf-3.02/xpdf/GfxState.cc xpdf-3.03/xpdf/GfxState.cc
} else if (obj1.isName("CalGray")) {
cs = GfxCalGrayColorSpace::parse(csObj->getArray());
} else if (obj1.isName("CalRGB")) {
-- cs = GfxCalRGBColorSpace::parse(csObj->getArray());
-+ cs = GfxCalRGBColorSpace::parse(csObj->getArray(), recursion);
+ cs = GfxCalRGBColorSpace::parse(csObj->getArray());
} else if (obj1.isName("Lab")) {
- cs = GfxLabColorSpace::parse(csObj->getArray());
+ cs = GfxLabColorSpace::parse(csObj->getArray(), recursion);
@@ -11649,27 +11648,6 @@ diff -ru xpdf-3.02/xpdf/GfxState.cc xpdf-3.03/xpdf/GfxState.cc
}
return cs;
}
-@@ -368,14 +388,18 @@
- return cs;
- }
-
--GfxColorSpace *GfxCalRGBColorSpace::parse(Array *arr) {
-+GfxColorSpace *GfxCalRGBColorSpace::parse(Array *arr, int recursion) {
- GfxCalRGBColorSpace *cs;
- Object obj1, obj2, obj3;
- int i;
-
-+ if (arr->getLength() < 2) {
-+ error(errSyntaxError, -1, "Bad CalRGB color space");
-+ return NULL;
-+ }
- arr->get(1, &obj1);
- if (!obj1.isDict()) {
-- error(-1, "Bad CalRGB color space");
-+ error(errSyntaxError, -1, "Bad CalRGB color space");
- obj1.free();
- return NULL;
- }
@@ -608,13 +634,17 @@
return cs;
}