diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-03-02 18:57:46 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-03-03 02:00:16 +0100 |
commit | 2c1ed5a5dad827cde032f27a4348e81be15889bc (patch) | |
tree | 3906a96a72a79902bf9c2fbe724537f6a14c29ed /sc/inc/navicfg.hxx | |
parent | abba6e22610ceff3d0e439b0ebd6137d064859a9 (diff) |
tdf#140606 make PDF parsing more lenient and prevent a crash
If the external document can't be opened, it tried to continue
with the export anyway, which eventually lead to a crash. This
is fixed by handling this situation and prevent a crash, however
the part of the document in this case isn't exported.
The document couldn't be opened because of a parsing error - there
was a unexpected null character instead of a whitespace, which
made the parser panic. Fix this by making the parser more lenient
in such a situation when there is an unexpected null and try to
continue parsing.
Bug document seems to be created with a buggy PDF writer, but other
PDF readers don't complain when parsing the document so it looks to
be a valid. qpdf --check doesn't complain either.
Added a test that checks a document with a null parses.
Change-Id: I61eb281e821ccd195ef006d778556e25d1c7f5e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111820
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/inc/navicfg.hxx')
0 files changed, 0 insertions, 0 deletions