summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Crain <jason@aquaticape.us>2012-09-11 19:24:11 +0200
committerAlbert Astals Cid <aacid@kde.org>2012-09-11 19:24:11 +0200
commit4d7a64a23fd4b4b5ee0d47ead8677f374aaaf6c9 (patch)
tree2a9628fad3abeaf86157e04f35b2a92db02324de
parent5f338ea7d01cabc0f8c50690d0bc262d85baa0ed (diff)
Check for NaN in TextPage::addChar
-rw-r--r--poppler/TextOutputDev.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index e8d993bf..0795bb35 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -29,6 +29,7 @@
// Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
// Copyright (C) 2011 Sam Liao <phyomh@gmail.com>
// Copyright (C) 2012 Horst Prote <prote@fmi.uni-stuttgart.de>
+// Copyright (C) 2012 Jason Crain <jason@aquaticape.us>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -2299,7 +2300,9 @@ void TextPage::addChar(GfxState *state, double x, double y,
state->transform(x, y, &x1, &y1);
if (x1 + w1 < 0 || x1 > pageWidth ||
y1 + h1 < 0 || y1 > pageHeight ||
- w1 > pageWidth || h1 > pageHeight) {
+ w1 > pageWidth || h1 > pageHeight ||
+ isnan(x1) || isnan(y1) ||
+ isnan(w1) || isnan(h1)) {
charPos += nBytes;
return;
}