From ea4c3dc4853aeddbc5364223cf0e825b65cb574e Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 8 Nov 2005 09:10:16 +0000 Subject: [PATCH] * src/type1/t1afm.c (T1_Read_PFM): Zero offset means `no kerning table available'. From Sergey Tolstov . --- ChangeLog | 5 +++++ src/type1/t1afm.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4c773fb5f..987309551 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-07 Werner Lemberg + + * src/type1/t1afm.c (T1_Read_PFM): Zero offset means `no kerning + table available'. From Sergey Tolstov . + 2005-11-03 Ville Syrjälä * src/base/ftobjs.c (FT_Open_Face): Avoid possible memory leak. diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index bef8251e1..83a8aa327 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -4,7 +4,7 @@ /* */ /* AFM support for Type 1 fonts (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -285,6 +285,11 @@ /* Kerning offset is 14 bytes from start of extensions table. */ p += 14; p = start + LITTLE_ENDIAN_UINT( p ); + + if ( p == start ) + /* zero offset means no table */ + goto Exit; + if ( p + 2 > limit ) { error = T1_Err_Unknown_File_Format;