diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-10-04 17:47:18 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-10-04 17:47:18 +0200 |
commit | 8217e3a5c0a2914e6d675c5a48467528d94a807b (patch) | |
tree | 423aa423d3b96fcbd3cbab814057d42bee2fe55b | |
parent | 02cfdb41c2d8b0b66bbb5b2d88191a65b4f14cf4 (diff) |
xpdf303: Make sure array length is > 0
This is not scritcly necessary since Array::get already returns a null object in case
the index is out of range but let's merge it for the sake of being more closer to xpdf
-rw-r--r-- | ALL_DIFF | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -10935,17 +10935,6 @@ diff -ru xpdf-3.02/xpdf/GfxState.cc xpdf-3.03/xpdf/GfxState.cc GfxColorSpace::~GfxColorSpace() {
}
-@@ -107,9 +120,9 @@
- } else if (csObj->isName("Pattern")) {
- cs = new GfxPatternColorSpace(NULL);
- } else {
- error(errSyntaxError, -1, "Bad color space '{0:s}'", csObj->getName());
- }
-- } else if (csObj->isArray()) {
-+ } else if (csObj->isArray() && csObj->arrayGetLength() > 0) {
- csObj->arrayGet(0, &obj1);
- if (obj1.isName("DeviceGray") || obj1.isName("G")) {
- cs = new GfxDeviceGrayColorSpace();
@@ -819,26 +854,27 @@
obj1.free();
arr->get(1, &obj1);
|