avoid predictible crashs

Asked by Arnaud Schmittbuhl on 2017-05-03

Hi all,

it's a feature request.
I recently stumbled upon a (temporarily) strange trouble.
Someone sent me some pdf files I tried to open with qpdfview. It crashes
every time with a "segmentation fault" message.
It took me some time to discover that the so called pdf files were
in fact... html files!
So, could it be possible to make a file format verification before
trying to load the file and adjust the error message accordingly?

Thanks à lot,

--
Arnaud

Question information

Language:
English Edit question
Status:
Answered
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Last query:
2017-05-03
Last reply:
2017-05-03
Adam Reichold (adamreichold) said : #1

Hello Arnaud,

thanks for taking the to report this. There is actually is a content-based format check in place, either using libmagic or shared-mime-info depending on whether Qt4 or Qt5 is used. In any case, if it crashes it is a bug. Even with malformed documents, the program should crash. Even they look like PDF internally but a just corrupt.

So could you: Open a bug report about this and attach such a document? Also could you specify which distribution, package, etc. you use? Thank you!

Best regards, Adam.

Can you help with this problem?

Provide an answer of your own, or ask Arnaud Schmittbuhl for more information if necessary.

To post a message you must log in.