freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Curb the scaling


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] Curb the scaling
Date: Thu, 12 Oct 2017 17:29:33 -0400

>> As per our discussion I propose the following patch to limit the
>> outline scaling so that ppem values do not exceed 65535.  As far as
>> I can see, no such limits are currently in place, ppem values are
>> simply truncated while the scaling factors are not limited.
>
> Looks good.

I am hesitating with the ppem-limiting patch. It turns out that the
fuzzer requests just 20 ppem, yet it overflows. So the glyphs spread
far beyond the EM and FT_Face->bbox too. Checking for reasonable size
by calling FT_Outline_Get_CBox may seem excessive, but we do call it
twice anyway when we enter FT_Render_Glyph. We do not need much, a lot
of overflows will be avoided if we only limit actual CBox to, say, 4
times EM.



reply via email to

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