freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] this piece of code seems broken - please check.


From: Hin-Tak Leung
Subject: [ft-devel] this piece of code seems broken - please check.
Date: Fri, 15 Jul 2016 14:41:42 +0000 (UTC)

src/truetype/ttinterp.c, Ins_MIRP()

Why is else ending with "#endif" ? That means depending on whether sub-pixel 
hinting is enabled, the bound-check below isn't performed. This code looks 
broken!
Somebody who understands this part, please check!!!

==============
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    if ( SUBPIXEL_HINTING_INFINALITY                        &&
         exc->ignore_x_mode                                 &&
         exc->GS.freeVector.x != 0                          &&
         !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )
      control_value_cutin = minimum_distance = 0;
    else
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */

    /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */

    if ( BOUNDS( point,       exc->zp1.n_points ) ||
         BOUNDSL( cvtEntry,   exc->cvtSize + 1 )  ||
         BOUNDS( exc->GS.rp0, exc->zp0.n_points ) )
    {
      if ( exc->pedantic_hinting )
        exc->error = FT_THROW( Invalid_Reference );
      goto Fail;
    }
===================


reply via email to

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