[poppler] poppler/Gfx.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Oct 5 14:19:59 PDT 2010
poppler/Gfx.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit d690bea929553d1a4392d42d949843e9467ba8cb
Author: Albert Astals Cid <aacid at kde.org>
Date: Tue Oct 5 22:18:22 2010 +0100
Make sure obj is a num before reading it
Not sure if using a 0 is correct otherwise, but if your matrix is
broken you're probably going to get a wrong rendering anyway, so who
cares. Bug #30590
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 7552fed..ed9accc 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -1262,7 +1262,8 @@ void Gfx::doSoftMask(Object *str, GBool alpha,
if (obj1.isArray()) {
for (i = 0; i < 6; ++i) {
obj1.arrayGet(i, &obj2);
- m[i] = obj2.getNum();
+ if (likely(obj2.isNum())) m[i] = obj2.getNum();
+ else m[i] = 0;
obj2.free();
}
} else {
@@ -4264,7 +4265,8 @@ void Gfx::doForm(Object *str) {
if (matrixObj.isArray()) {
for (i = 0; i < 6; ++i) {
matrixObj.arrayGet(i, &obj1);
- m[i] = obj1.getNum();
+ if (likely(obj1.isNum())) m[i] = obj1.getNum();
+ else m[i] = 0;
obj1.free();
}
} else {
More information about the poppler
mailing list