From 3987b15ef76982a509a72356fc8d2f1a3aa76e91 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 2 Oct 2010 11:46:19 +0200 Subject: [PATCH] Fix Savannah bug #31088 (sort of). * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64 function entries. --- ChangeLog | 7 +++++++ src/sfnt/ttload.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9318a099..08c845c21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-02 Werner Lemberg + + Fix Savannah bug #31088 (sort of). + + * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64 + function entries. + 2010-10-02 Werner Lemberg [smooth] Fix splitting of cubics for negative values. diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index 1c174aff9..84aef2dde 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -680,9 +680,9 @@ /* broken fonts like `Keystrokes MT' :-( */ /* */ /* We allocate 64 function entries by default when */ - /* the maxFunctionDefs field is null. */ + /* the maxFunctionDefs value is smaller. */ - if ( maxProfile->maxFunctionDefs == 0 ) + if ( maxProfile->maxFunctionDefs < 64 ) maxProfile->maxFunctionDefs = 64; /* we add 4 phantom points later */