freetype-devel
[Top][All Lists]
Advanced

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

[Devel] truetype loader crashes in current CVS version


From: Sven Neumann
Subject: [Devel] truetype loader crashes in current CVS version
Date: 24 Jul 2002 15:23:17 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hi,

I'm experiencing crashes with the current CVS version whenever I try
to load a truetype font. If FT_CONFIG_OPTION_INCREMENTAL is undefined
(this is the default), the TrueType loader crashes in line 852 of
src/truetype/ttgload.c when it tries to access face->glyph_locations.
This pointer is always NULL since the array is allocated in
TT_Load_Locations() which is only called if FT_CONFIG_OPTION_INCREMENTAL
is defined (see ttobjs.c line 203).

Another unrelated note: I think that FT_Error should be initialized to
0 in FT_Glyph_To_Bitmap() since it will otherwise be used uninitialized
when this function is called with a bitmap glyph. Here's a simple patch
that fixes this problem:

Index: src/base/ftglyph.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/base/ftglyph.c,v
retrieving revision 1.47
diff -u -p -r1.47 ftglyph.c
--- ftglyph.c   2002/07/08 23:05:14     1.47
+++ ftglyph.c   2002/07/24 13:21:08
@@ -572,7 +572,7 @@
                       FT_Bool     destroy )
   {
     FT_GlyphSlotRec  dummy;
-    FT_Error         error;
+    FT_Error         error = 0;
     FT_Glyph         glyph;
     FT_BitmapGlyph   bitmap = NULL;
 


Salut, Sven


reply via email to

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