small fix

This commit is contained in:
David Turner 2002-07-11 23:55:18 +00:00
parent 60b8b532c7
commit 6d1a81a940
1 changed files with 6 additions and 1 deletions

View File

@ -155,7 +155,7 @@
FT_UInt num_tables ) FT_UInt num_tables )
{ {
FT_Error error; FT_Error error;
FT_UInt nn; FT_UInt nn, has_head = 0;
static const FT_Frame_Field sfnt_dir_entry_fields[] = static const FT_Frame_Field sfnt_dir_entry_fields[] =
{ {
@ -201,6 +201,8 @@
{ {
FT_UInt32 magic; FT_UInt32 magic;
has_head = 1;
if ( table.Length != 0x36 || if ( table.Length != 0x36 ||
FT_STREAM_SEEK( offset + table.Offset + 12 ) || FT_STREAM_SEEK( offset + table.Offset + 12 ) ||
FT_READ_ULONG( magic ) || FT_READ_ULONG( magic ) ||
@ -212,6 +214,9 @@
} }
} }
if ( has_head == 0 )
goto Bad_Format;
Exit: Exit:
return error; return error;