From 57f45dc82ca0ddfb8dcf6c40eebbc97a6d42b5df Mon Sep 17 00:00:00 2001 From: Jason Crain Date: Sat, 1 Sep 2012 01:32:03 -0500 Subject: [PATCH] Check for NaN in TextPage::addChar --- poppler/TextOutputDev.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index adbb79f..81e387c 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -2299,7 +2299,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; } -- 1.7.9.5