[sfnt] Ignore invalid magic number in head' or
bhed'.
Other font engines seem to ignore it also. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if we have an invalid magic number.
This commit is contained in:
parent
9a7951d99b
commit
274207eb9a
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2013-07-18 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[sfnt] Ignore invalid magic number in `head' or `bhed'.
|
||||
|
||||
Other font engines seem to ignore it also. Problem reported by
|
||||
Hin-Tak Leung <htl10@users.sourceforge.net>.
|
||||
|
||||
* src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
|
||||
we have an invalid magic number.
|
||||
|
||||
2013-07-16 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[smooth] Fix segfault caused by previous commit.
|
||||
|
@ -236,7 +236,8 @@
|
||||
*/
|
||||
if ( table.Length < 0x36 )
|
||||
{
|
||||
FT_TRACE2(( "check_table_dir: `head' table too small\n" ));
|
||||
FT_TRACE2(( "check_table_dir:"
|
||||
" `head' or `bhed' table too small\n" ));
|
||||
error = FT_THROW( Table_Missing );
|
||||
goto Exit;
|
||||
}
|
||||
@ -246,12 +247,8 @@
|
||||
goto Exit;
|
||||
|
||||
if ( magic != 0x5F0F3CF5UL )
|
||||
{
|
||||
FT_TRACE2(( "check_table_dir:"
|
||||
" no magic number found in `head' table\n"));
|
||||
error = FT_THROW( Table_Missing );
|
||||
goto Exit;
|
||||
}
|
||||
" invalid magic number in `head' or `bhed' table\n"));
|
||||
|
||||
if ( FT_STREAM_SEEK( offset + ( nn + 1 ) * 16 ) )
|
||||
goto Exit;
|
||||
|
Loading…
Reference in New Issue
Block a user