Blame SOURCES/poppler-0.26.2-invalid-matrix.patch
|
|
1d3252 |
From acc33a6950031ac4a5c759d043d24df0cfa7e8b6 Mon Sep 17 00:00:00 2001
|
|
|
1d3252 |
From: Jason Crain <jason@aquaticape.us>
|
|
|
1d3252 |
Date: Sat, 20 Dec 2014 02:24:49 -0600
|
|
|
1d3252 |
Subject: [PATCH] Check for invalid matrix in annotation
|
|
|
1d3252 |
|
|
|
1d3252 |
Bug #84990
|
|
|
1d3252 |
---
|
|
|
1d3252 |
poppler/Gfx.cc | 12 ++++++++++--
|
|
|
1d3252 |
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
1d3252 |
|
|
|
1d3252 |
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
|
|
|
1d3252 |
index 64a9d7b..77693f9 100644
|
|
|
1d3252 |
--- a/poppler/Gfx.cc
|
|
|
1d3252 |
+++ b/poppler/Gfx.cc
|
|
|
1d3252 |
@@ -37,6 +37,7 @@
|
|
|
1d3252 |
// Copyright (C) 2012 Even Rouault <even.rouault@mines-paris.org>
|
|
|
1d3252 |
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
|
|
|
1d3252 |
// Copyright (C) 2012 Lu Wang <coolwanglu@gmail.com>
|
|
|
1d3252 |
+// Copyright (C) 2014 Jason Crain <jason@aquaticape.us>
|
|
|
1d3252 |
//
|
|
|
1d3252 |
// To see a description of the changes please see the Changelog file that
|
|
|
1d3252 |
// came with your tarball or type make ChangeLog if you are building from git
|
|
|
1d3252 |
@@ -5285,8 +5286,15 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
|
|
|
1d3252 |
if (matrixObj.isArray() && matrixObj.arrayGetLength() >= 6) {
|
|
|
1d3252 |
for (i = 0; i < 6; ++i) {
|
|
|
1d3252 |
matrixObj.arrayGet(i, &obj1);
|
|
|
1d3252 |
- m[i] = obj1.getNum();
|
|
|
1d3252 |
- obj1.free();
|
|
|
1d3252 |
+ if (likely(obj1.isNum())) {
|
|
|
1d3252 |
+ m[i] = obj1.getNum();
|
|
|
1d3252 |
+ obj1.free();
|
|
|
1d3252 |
+ } else {
|
|
|
1d3252 |
+ obj1.free();
|
|
|
1d3252 |
+ matrixObj.free();
|
|
|
1d3252 |
+ error(errSyntaxError, getPos(), "Bad form matrix");
|
|
|
1d3252 |
+ return;
|
|
|
1d3252 |
+ }
|
|
|
1d3252 |
}
|
|
|
1d3252 |
} else {
|
|
|
1d3252 |
m[0] = 1; m[1] = 0;
|
|
|
1d3252 |
--
|
|
|
1d3252 |
2.1.0
|
|
|
1d3252 |
|