Summary: | An invalid pfb font (dvi) makes Okular crash on exit | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Nikolai Iorgov <n_iorgov> |
Component: | DVI backend | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | luigi.toscano |
Priority: | NOR | ||
Version: | 0.14.3 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=303479 | ||
Latest Commit: | http://commits.kde.org/okular/823a84942df4d3604b041ef7878a9984b1f12b7f | Version Fixed In: | 4.8.5 |
Sentry Crash Report: | |||
Attachments: | corrupted font which leads to crash of Okular |
Description
Nikolai Iorgov
2012-07-13 14:05:19 UTC
This bug probably related to the other bug I reported: https://bugs.kde.org/show_bug.cgi?id=303479 One of the fonts used to display DVI-file maybe corrupted: Name : "cmsy7, 100%" Type : TeX Free Type-handled File: The font /usr/share/texmf/fonts/type1/bluesky/cm/cmsy7.pfb could be opened and read, but its font format is unsupported If I change the DVI-file to exclude the usage of the mentioned font, the problem with crashing while closing or returning to Editor (kile) disappear. In any case the problems with fonts should not lead to Okular's crashing. Created attachment 72520 [details]
corrupted font which leads to crash of Okular
Git commit 99c4da2f9ef86e345ee02cecb10e0df8f5e5b2e2 by Luigi Toscano. Committed on 15/07/2012 at 21:15. Pushed by ltoscano into branch 'master'. Avoid crash when the font is broken. The call to FT_New_Face takes the address of the 'face' variable, whose type is a typedef *something TF_Face; The value of TF_Face (so a pointer to the properly filled font structure) s then replaced inside the call of TF_New_Face; but when the latter function fails, the value of 'face' is not reset and this leads to a crash in the distructor of TeXFont_PFB. So properly initialize TF_Face to 0, its address is valid, and the code works. FIXED-IN: 4.8.5 M +1 -1 generators/dvi/TeXFont_PFB.cpp http://commits.kde.org/okular/99c4da2f9ef86e345ee02cecb10e0df8f5e5b2e2 Git commit bd733dab90ab3e7709c0e47796881b9cdf224554 by Luigi Toscano. Committed on 15/07/2012 at 21:15. Pushed by ltoscano into branch 'KDE/4.9'. Avoid crash when the font is broken. The call to FT_New_Face takes the address of the 'face' variable, whose type is a typedef *something TF_Face; The value of TF_Face (so a pointer to the properly filled font structure) s then replaced inside the call of TF_New_Face; but when the latter function fails, the value of 'face' is not reset and this leads to a crash in the distructor of TeXFont_PFB. So properly initialize TF_Face to 0, its address is valid, and the code works. FIXED-IN: 4.8.5 (cherry picked from commit 99c4da2f9ef86e345ee02cecb10e0df8f5e5b2e2) M +1 -1 generators/dvi/TeXFont_PFB.cpp http://commits.kde.org/okular/bd733dab90ab3e7709c0e47796881b9cdf224554 Git commit 823a84942df4d3604b041ef7878a9984b1f12b7f by Luigi Toscano. Committed on 15/07/2012 at 21:15. Pushed by ltoscano into branch 'KDE/4.8'. Avoid crash when the font is broken. The call to FT_New_Face takes the address of the 'face' variable, whose type is a typedef *something TF_Face; The value of TF_Face (so a pointer to the properly filled font structure) s then replaced inside the call of TF_New_Face; but when the latter function fails, the value of 'face' is not reset and this leads to a crash in the distructor of TeXFont_PFB. So properly initialize TF_Face to 0, its address is valid, and the code works. FIXED-IN: 4.8.5 (cherry picked from commit 99c4da2f9ef86e345ee02cecb10e0df8f5e5b2e2) M +1 -1 generators/dvi/TeXFont_PFB.cpp http://commits.kde.org/okular/823a84942df4d3604b041ef7878a9984b1f12b7f |