freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] Segfault in FT_Get_Kerning ifndef TT_CONFIG_OPTION_POSTSCRIPT


From: Tony J. Ibbs
Subject: [ft-devel] Segfault in FT_Get_Kerning ifndef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
Date: Fri, 21 Oct 2005 13:40:31 +0100

I have observed a segmentation fault calling FT_Get_Kerning in freetype 2.1.10.

The application is loading fonts from a header file, which I assume are
TrueType. TT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined. A little
investigation shows this problem to be in src/sfnt/sfdriver, and it is
fixable by the following patch:

--- sfdriver.c.orig     2005-10-20 17:33:29.000000000 +0100
+++ sfdriver.c  2005-10-21 09:57:50.000000000 +0100
@@ -395,6 +395,7 @@

 #else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */

+    tt_face_get_kerning,  /* insert missing entry */
     0,
     0,

(i.e., make both the "ifdef" and "ifndef" choices for
TT_CONFIG_OPTION_POSTSCRIPT_NAMES have "tt_face_get_kerning"). Without
this change, there are three entries for the #ifdef, but only two for
the #else. I assume that it would actually be better to have a single
entry for "tt_face_get_kerning" before the conditional...

Tibs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]