[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] this piece of code seems broken - please check.
From: |
Hin-Tak Leung |
Subject: |
Re: [ft-devel] this piece of code seems broken - please check. |
Date: |
Fri, 15 Jul 2016 15:30:09 +0000 (UTC) |
The stray "else" was added in this commit. I think it is just added by mistake.
Please check.
commit ed1d8983f3826124e814145b7556fc8f03ae88df
Author: Nikolaus Waxweiler <address@hidden>
Date: Wed May 18 06:58:44 2016 +0200
[truetype] New implementation of v38 bytecode interpreter [2/3].
--------------------------------------------
On Fri, 15/7/16, Hin-Tak Leung <address@hidden> wrote:
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;
}
===================