blob: ed3169eab5722f0cd00cc2c91dcaffc54fbf972b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 2ed4cd66401bc1d9683c94238e9024218d7be3ba Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 7 Apr 2021 00:14:59 +0200
Subject: [PATCH] TextOutputDev: Fix crash in malformed file
oss-fuzz/32952
---
poppler/TextOutputDev.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index ea12b4689..956c13289 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) {
--
GitLab
|