[Okular-devel] [Bug 303472] An invalid pfb font (dvi) makes Okular crash on exit

Luigi Toscano luigi.toscano at tiscali.it
Sun Jul 15 20:11:02 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=303472

Luigi Toscano <luigi.toscano at tiscali.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|http://commits.kde.org/okul |http://commits.kde.org/okul
                   |ar/99c4da2f9ef86e345ee02cec |ar/bd733dab90ab3e7709c0e477
                   |b10e0df8f5e5b2e2            |96881b9cdf224554

--- Comment #4 from Luigi Toscano <luigi.toscano at tiscali.it> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list