[poppler] poppler/Gfx.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Thu May 4 22:48:13 UTC 2017
poppler/Gfx.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit cdab9a2dc27a10c84550db28fac8dbdcdcd4d29d
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri May 5 00:47:45 2017 +0200
Move the bits sanity checking a bit higher in the function
Saves some time and makes the code simpler as we have to delete one
thing less
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 6f06f6ca..a2d1db0c 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4407,6 +4407,9 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
}
}
} else {
+ if (bits == 0) {
+ goto err1;
+ }
// get color space and color map
dict->lookup("ColorSpace", &obj1);
@@ -4479,10 +4482,6 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
obj1.free();
dict->lookup("D", &obj1);
}
- if (bits == 0) {
- delete colorSpace;
- goto err2;
- }
colorMap = new GfxImageColorMap(bits, &obj1, colorSpace);
obj1.free();
if (!colorMap->isOk()) {
More information about the poppler
mailing list