freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: Request about font name problem


From: KUSANO Takayuki
Subject: [Devel] Re: Request about font name problem
Date: Thu, 28 Mar 2002 10:42:15 +0900
User-agent: Wanderlust/2.9.8 (Unchained Melody) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)

> >   This table show that 2.0.9 is good. But some fonts kill ftdump
> >   by segv.
> 
> That's most likely an unrelated problem. It would be good to get it
> fixed, though. :-) Maybe you could provide a backtrace in gdb
> of the segfault?

  I traced ftdump. SEGV was occured at line 163 in src/sfnt/sfdriver.c
  [get_sfnt_postscript_name()].

  memcpy() called from line 181 also caused SEGV.

>163.          if ( p[0] == 0 && p[1] >= 32 && p[1] < 128 )
>181.          MEM_Copy( result, name->string, len );

  Following patch fixes this bug.

Index: sfdriver.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/sfnt/sfdriver.c,v
retrieving revision 1.40.2.1
diff -u -r1.40.2.1 sfdriver.c
--- sfdriver.c  2002/03/04 18:09:10     1.40.2.1
+++ sfdriver.c  2002/03/28 01:34:27
@@ -145,7 +145,7 @@
       }
     }
     
-    if ( found_win )
+    if ( found_win != -1 )
     {
       FT_Memory    memory = face->root.memory;
       TT_NameRec*  name   = face->name_table.names + found_win;
@@ -168,10 +168,10 @@
       return result;
     }
 
-    if ( found_apple )
+    if ( found_apple != -1 )
     {
       FT_Memory    memory = face->root.memory;
-      TT_NameRec*  name   = face->name_table.names + found_win;
+      TT_NameRec*  name   = face->name_table.names + found_apple;
       FT_UInt      len    = name->stringLength;
       FT_Error     error;
       FT_String*   result;


  KUSANO Takayuki <URL:http://www.asahi-net.or.jp/~AE5T-KSN/>



reply via email to

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