[poppler] poppler/TextOutputDev.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 12 23:36:03 UTC 2022
poppler/TextOutputDev.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 4139f79cf8c4e3f529570c9a300491c36f9100e8
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri May 13 01:31:00 2022 +0200
TextPage::coalesce: Fix crash on broken files
oss-fuzz/47350
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 1be85549..3ed1c90d 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -20,7 +20,7 @@
// Copyright (C) 2006 Jeff Muizelaar <jeff at infidigm.net>
// Copyright (C) 2007, 2008, 2012, 2017 Adrian Johnson <ajohnson at redneon.com>
// Copyright (C) 2008 Koji Otani <sho at bbr.jp>
-// Copyright (C) 2008, 2010-2012, 2014-2021 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008, 2010-2012, 2014-2022 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2008 Pino Toscano <pino at kde.org>
// Copyright (C) 2008, 2010 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2009 Ross Moore <ross at maths.mq.edu.au>
@@ -3637,6 +3637,7 @@ void TextPage::coalesce(bool physLayout, double fixedPitch, bool doHTML, double
envelopes[i].x2 = DBL_MIN;
envelopes[i].y1 = DBL_MAX;
envelopes[i].y2 = DBL_MIN;
+ ending_blocks[i] = nullptr;
}
for (blk1 = blkList; blk1; blk1 = blk1->next) {
@@ -3661,7 +3662,7 @@ void TextPage::coalesce(bool physLayout, double fixedPitch, bool doHTML, double
}
for (blk1 = blkList; blk1; blk1 = blk1->next) {
- if (blk1->tableId >= 0 && blk1->xMin <= ending_blocks[blk1->tableId]->xMax && blk1->xMax >= ending_blocks[blk1->tableId]->xMin) {
+ if (blk1->tableId >= 0 && ending_blocks[blk1->tableId] && blk1->xMin <= ending_blocks[blk1->tableId]->xMax && blk1->xMax >= ending_blocks[blk1->tableId]->xMin) {
blk1->tableEnd = true;
}
}
More information about the poppler
mailing list