freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] [NECSV- LSBPJ] Implementation Error of FreeType function FT_G


From: phult
Subject: [ft-devel] [NECSV- LSBPJ] Implementation Error of FreeType function FT_Get_PFR_Metrics()
Date: Tue, 20 Jan 2009 15:54:27 +0700

To freetype maintainers,

In developing the test for the freetype function FT_Get_PFR_Metrics(), we
have encountered the following possible implementation error.

The specification for FT_Get_PFR_Metrics() specified that for non-PFR font:
Any or all of the parameters ametrics_y_scale, ametrics_resolution,
ametrics_x_scale and aoutline_resolution can be NULL.

However, after we called FT_Get_PFR_Metrics() function with a non-pfr font
and any or all of the parameters: ametrics_y_scale, ametrics_resolution,
ametrics_x_scale or aoutline_resolution being NULL. Then access the value of
any or all of the parameters, a segmentation fault will happen.

There is an inconsistency between the spec and the implementation: It looks
like FT_Get_PFR_Metrics does not handle NULL parameters or all parameters
can't be NULL for non-PFR font.

To help demonstrate the alleged-bug, we have included with this email:
  a) a C program ft_get_pfr_metrics.c and
  b) font file FreeMono.ttf packed in V0030.rar

Run the program with font file name, aoutline_resolution ,
ametrics_resolution, ametrics_x_scale and ametrics_y_scale as its arguments:
  ./ft_get_pfr_metrics FreeMono.ttf 0 1 1 1
  ./ft_get_pfr_metrics FreeMono.ttf 1 0 1 1
  ./ft_get_pfr_metrics FreeMono.ttf 1 1 0 1
  ./ft_get_pfr_metrics FreeMono.ttf 1 1 1 0
  ./ft_get_pfr_metrics FreeMono.ttf 0 0 0 0

We have tested and reproduced this error on 32-bit and 64-bit x86 based test
systems running under the following distros OpenSuSE 11 (32 bit), Ubuntu
8.04 (ia32), RHEL52 x86-64, SLES 10.1 (32bit), Fedora 9 (32bit) with
freetype 2.1.10, freetype 2.3.8 and the current version of CVS as of today
2009/01/20.


Thank-you very much for your attention.


Sincerely yours,

Le Tan Phu
NEC Solutions VietNam

Attachment: V0030.rar
Description: Binary data


reply via email to

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