[poppler] Branch 'poppler-0.14' - poppler/Gfx.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Oct 5 14:20:56 PDT 2010
poppler/Gfx.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit d9918bad34a32763064b041002b7b578a0415873
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 76dae02..4eb8c54 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 {
@@ -4251,7 +4252,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