summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-03-02 18:57:46 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-03-13 03:49:41 +0100
commit90267d3dee8c0afe937c9aecb8561f6f158977f9 (patch)
treec3b23f6f2527e250f930f44fa53afae214573a6b /sc
parent2225d8530b4a7fa29e551f9354d679da78be6435 (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. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111820 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 2c1ed5a5dad827cde032f27a4348e81be15889bc) Change-Id: I61eb281e821ccd195ef006d778556e25d1c7f5e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112418 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc')
0 files changed, 0 insertions, 0 deletions