freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] pfm file loading bug


From: Sergey Tolstov
Subject: [ft] pfm file loading bug
Date: Sat, 5 Nov 2005 13:05:55 -0800

Hello,

There is a bug in FT 2.1.10 when it loads PFM file for type 1.
In the function T1_Read_PFM, t1afm.c, it does not check for zero value
in dfPairKernTable field of Extension table. Apparently, zero means no
kerning table. It is zero in a number of fonts (e.g. Slogan Normal), but
the function does not check for zero, reads kerning table from the
beginning of the file, and fails with T1_Err_Unknown_File_Format.

/* Kerning offset is 14 bytes from start of extensions table. */
    p += 14;
    p = start + LITTLE_ENDIAN_UINT( p );

Should be:

p += 14;

if (!LITTLE_ENDIAN_UINT( p ))
  goto Exit;

p = start + LITTLE_ENDIAN_UINT( p );

Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]