Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Rosenfield
poppler
Commits
4139f79c
Commit
4139f79c
authored
May 13, 2022
by
Albert Astals Cid
Browse files
TextPage::coalesce: Fix crash on broken files
oss-fuzz/47350
parent
4eeb3380
Changes
1
Hide whitespace changes
Inline
Side-by-side
poppler/TextOutputDev.cc
View file @
4139f79c
...
...
@@ -20,7 +20,7 @@
// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net>
// Copyright (C) 2007, 2008, 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
// Copyright (C) 2008, 2010-2012, 2014-202
1
Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008, 2010-2012, 2014-202
2
Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008, 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2009 Ross Moore <ross@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
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment