I've recorded this as bug #16759, it is also now fixed in the CVS
Hmm, I get the segfault below with
valgrind --leak-check=full ftview 20 F2.cff
(F2.cff is the example font sent by Boris.)
Werner
======================================================================
==26040== Memcheck, a memory error detector.
==26040== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==26040== Using LibVEX rev 1313, a library for dynamic binary translation.
==26040== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==26040== Using valgrind-3.0.1.SVN, a dynamic binary instrumentation framework.
==26040== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==26040== For more details, rerun with: -v
==26040==
==26040== Invalid read of size 4
==26040== at 0x8079596: cff_sid_to_glyph_name (cffcmap.c:128)
==26040== by 0x80B5799: ps_unicodes_init (psmodule.c:211)
==26040== by 0x807966F: cff_cmap_unicode_init (cffcmap.c:161)
==26040== by 0x8056505: FT_CMap_New (ftobjs.c:2708)
==26040== by 0x8075128: cff_face_init (cffobjs.c:701)
==26040== by 0x8053F1D: open_face (ftobjs.c:987)
==26040== by 0x8054DC1: FT_Open_Face (ftobjs.c:1694)
==26040== by 0x8053FF2: FT_New_Face (ftobjs.c:1047)
==26040== by 0x804BDBD: FTDemo_Install_Font (ftcommon.c:352)
==26040== by 0x804B182: main (ftview.c:1071)
==26040== Address 0x7D8 is not stack'd, malloc'd or (recently) free'd
==26040==
==26040== Process terminating with default action of signal 11 (SIGSEGV)
==26040== Access not within mapped region at address 0x7D8
==26040== at 0x8079596: cff_sid_to_glyph_name (cffcmap.c:128)
==26040== by 0x80B5799: ps_unicodes_init (psmodule.c:211)
==26040== by 0x807966F: cff_cmap_unicode_init (cffcmap.c:161)
==26040== by 0x8056505: FT_CMap_New (ftobjs.c:2708)
==26040== by 0x8075128: cff_face_init (cffobjs.c:701)
==26040== by 0x8053F1D: open_face (ftobjs.c:987)
==26040== by 0x8054DC1: FT_Open_Face (ftobjs.c:1694)
==26040== by 0x8053FF2: FT_New_Face (ftobjs.c:1047)
==26040== by 0x804BDBD: FTDemo_Install_Font (ftcommon.c:352)
==26040== by 0x804B182: main (ftview.c:1071)
==26040==
==26040== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 19 from 1)
==26040== malloc/free: in use at exit: 44796 bytes in 61 blocks.
==26040== malloc/free: 77 allocs, 16 frees, 46430 bytes allocated.
==26040== For counts of detected errors, rerun with: -v
==26040== searching for pointers to 61 not-freed blocks.
==26040== checked 302836 bytes.
==26040==
==26040== LEAK SUMMARY:
==26040== definitely lost: 0 bytes in 0 blocks.
==26040== possibly lost: 0 bytes in 0 blocks.
==26040== still reachable: 44796 bytes in 61 blocks.
==26040== suppressed: 0 bytes in 0 blocks.
==26040== Reachable blocks (those to which a pointer was found) are not shown.
==26040== To see them, rerun with: --show-reachable=yes