ref: 274207eb9a0e3bb20edf30e9a62e25120d5d15e5
parent: 9a7951d99b056957ba002a4e20ba7057d64faff5
author: Werner Lemberg <[email protected]>
date: Thu Jul 18 08:38:57 EDT 2013
[sfnt] Ignore invalid magic number in `head' or `bhed'. Other font engines seem to ignore it also. Problem reported by Hin-Tak Leung <[email protected]>. * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if we have an invalid magic number.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-07-18 Werner Lemberg <[email protected]>
+
+ [sfnt] Ignore invalid magic number in `head' or `bhed'.
+
+ Other font engines seem to ignore it also. Problem reported by
+ Hin-Tak Leung <[email protected]>.
+
+ * 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 <[email protected]>
[smooth] Fix segfault caused by previous commit.
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -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;