[okular] [Bug 407140] New: Crash, QTextDocument chokes on input and ends up with negative pagecounts

Stefan BrĂ¼ns bugzilla_noreply at kde.org
Wed May 1 23:44:23 BST 2019


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-devel at kde.org
          Reporter: stefan.bruens at 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 the assignee for the bug.


More information about the Okular-devel mailing list