From 6d1a81a94093ea1fbaee1cd1aa8626cbe7f4f12d Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 11 Jul 2002 23:55:18 +0000 Subject: [PATCH] small fix --- src/sfnt/ttload.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index 9d52fca3a..4b27f58d6 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -155,7 +155,7 @@ FT_UInt num_tables ) { FT_Error error; - FT_UInt nn; + FT_UInt nn, has_head = 0; static const FT_Frame_Field sfnt_dir_entry_fields[] = { @@ -201,6 +201,8 @@ { FT_UInt32 magic; + has_head = 1; + if ( table.Length != 0x36 || FT_STREAM_SEEK( offset + table.Offset + 12 ) || FT_READ_ULONG( magic ) || @@ -212,6 +214,9 @@ } } + if ( has_head == 0 ) + goto Bad_Format; + Exit: return error;