* src/sfnt/ttload.c (sfnt_dir_check): relaxed the "head" table size

verification to accept a few broken fonts who pad the size incorrectly
    (the table should be padded, but its "size" field shouldn't per se
     the spec)
BRANCH-2-1-5
David Turner 22 years ago
parent 4a1cdf133b
commit fb2bcfc594
  1. 4
      ChangeLog
  2. 9
      src/sfnt/ttload.c

@ -11,6 +11,10 @@
adding a new API, named FT_Get_BDF_Property to retrieve the BDF
properties of a given PCF or BDF font
* src/sfnt/ttload.c (sfnt_dir_check): relaxed the "head" table size
verification to accept a few broken fonts who pad the size incorrectly
(the table should be padded, but its "size" field shouldn't per se
the spec)
2003-01-18 Werner Lemberg <wl@gnu.org>

@ -213,7 +213,14 @@
has_head = 1;
if ( table.Length != 0x36 ||
/* the table length should be 0x36, but certain font tools
* make it 0x38, so we will just check that it is greater.
*
* note that according to the specification,
* the table must be padded to 32-bit lengths, but this doesn't
* apply to the value of its "Length" field !!
*/
if ( table.Length < 0x36 ||
FT_STREAM_SEEK( table.Offset + 12 ) ||
FT_READ_ULONG( magic ) ||
magic != 0x5F0F3CF5UL )

Loading…
Cancel
Save