From dc3ff31c3fd00946917b2f07d2f6a70da36afe35 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 17 May 2006 12:59:35 +0000 Subject: [PATCH] * src/ftccmap.c (FTC_CMapCache_Lookup): changed the threshold used to detect rogue clients from 4 to 16. This is to prevent some segmentation faults with fonts like KozMinProVI-Regular.otf which comes from the Japanese Adobe Reader Asian Font pack. --- ChangeLog | 7 +++++++ src/cache/ftccmap.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6d49e896..5ce535870 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-17 David Turner + + * src/ftccmap.c (FTC_CMapCache_Lookup): changed the threshold + used to detect rogue clients from 4 to 16. This is to prevent + some segmentation faults with fonts like KozMinProVI-Regular.otf + which comes from the Japanese Adobe Reader Asian Font pack. + 2007-05-17 Werner Lemberg * src/cff/cffload.c (cff_font_done): Deallocate subfont array. This diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c index fefcbdfc0..4d6fd9a5c 100644 --- a/src/cache/ftccmap.c +++ b/src/cache/ftccmap.c @@ -305,9 +305,13 @@ * more than a few charmaps, so if the index is very large... * * It is also very unlikely that a rogue client is interested - * in Unicode values 0 to 3. + * in Unicode values 0 to 15. + * + * NOTE: The original threshold was 4, but we found a font + * from the Adobe Acrobat Reader Pack, named + * "KozMinProVI-Regular.otf" which contained more than 5 charmaps. */ - if ( cmap_index >= 4 ) + if ( cmap_index >= 16 ) { FTC_OldCMapDesc desc = (FTC_OldCMapDesc) face_id;