[poppler] poppler/TextOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 6 22:26:23 UTC 2021


 poppler/TextOutputDev.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2ed4cd66401bc1d9683c94238e9024218d7be3ba
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Apr 7 00:14:59 2021 +0200

    TextOutputDev: Fix crash in malformed file
    
    oss-fuzz/32952

diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index ea12b468..956c1328 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -931,7 +931,7 @@ TextPool::~TextPool()
 int TextPool::getBaseIdx(double base) const
 {
     const double baseIdxDouble = base / textPoolStep;
-    if (baseIdxDouble < minBaseIdx) {
+    if (std::isnan(baseIdxDouble) || baseIdxDouble < minBaseIdx) {
         return minBaseIdx;
     }
     if (baseIdxDouble > maxBaseIdx) {


More information about the poppler mailing list