From cee5d593582801f65c5e127d9de9ca24ebcdc747 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 1 Mar 2012 09:26:03 +0100 Subject: [PATCH] [bdf] Fix Savannah bug #35643. * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with comment before `_bdf_list_split', this is, really allocate at least five `field' elements. --- ChangeLog | 8 ++++++++ src/bdf/bdflib.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 41830b7b1..89e069a10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-02-29 Werner Lemberg + + [bdf] Fix Savannah bug #35643. + + * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with + comment before `_bdf_list_split', this is, really allocate at least + five `field' elements. + 2012-02-29 Werner Lemberg [bdf] Fix Savannah bug #35641. diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index 5a718cbcb..879d491e4 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -462,7 +462,7 @@ if ( num_items > list->size ) { unsigned long oldsize = list->size; /* same as _bdf_list_t.size */ - unsigned long newsize = oldsize + ( oldsize >> 1 ) + 4; + unsigned long newsize = oldsize + ( oldsize >> 1 ) + 5; unsigned long bigsize = (unsigned long)( FT_INT_MAX / sizeof ( char* ) ); FT_Memory memory = list->memory;