https://bugs.kde.org/show_bug.cgi?id=407140
Bug ID: 407140 Summary: Crash, QTextDocument chokes on input and ends up with negative pagecounts Product: okular Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: EPub backend Assignee: okular-de...@kde.org Reporter: stefan.bru...@rwth-aachen.de Target Milestone: --- Created attachment 119786 --> https://bugs.kde.org/attachment.cgi?id=119786&action=edit Problematic PDF SUMMARY The EPub generator wraps the page content with a html table, and after QTextDocument::setHtml(...) the pageCount() is -42192. This later leads to crashes when the page number is used as an array index. Removing the wrapping table from the firstpage code path avoids the bad behavior. The problematic PDF is the one from https://bugs.kde.org/show_bug.cgi?id=406116, but with the bad navPoint entries removed. According to EPubCheck, the fixed file is wellformed. STEPS TO REPRODUCE 1. Try to open the attached EPub with okular. OBSERVED RESULT Crash SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed 20190428 KDE Plasma Version: 19.04.00 KDE Frameworks Version: 5.57 Qt Version: 5.12 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.