freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] error enums that I _cannot_ add


From: Werner LEMBERG
Subject: Re: [ft-devel] error enums that I _cannot_ add
Date: Thu, 21 Jul 2016 16:18:55 +0200 (CEST)

> Argh, my question was meant to be "can you give me some hints how to
> add those" :-).

:-)

> I added the 64k limit myself - that was b52/b53 - line 3715 and
> 4010, after the "case 0x2D" lines: (
> http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/truetype/ttinterp.c
> ) insert something like
> 
> if ( (def->end - def->start) > 65535 )
>     warning();

Yep.

> BTW, I think line 4010 is missing a "def->end = exc->IP;"
> line. "def->end" is not used except for bound checking, (though
> precisely because it is used for that, I did put it in my diagnostic
> patch set) so it is probably not important, but you might still want
> to add that line, to match how it looks around line 3715.

Will add.  Patch, please.

> It annoys me slightly that I cannot put the "end without if" check
> in easily -

You mean EIF?

> I have a test file for it, actually.  But I understand there is no
> reason for Freetype to even notice such a thing - an "end without
> if" is just a no-op, and does not see to get special attention.
> I'll figure out something, one day.

You could perhaps move the local variable `nIFs' in function `Ins_IF'
to the `TT_ExecContext' structure.  Then, in function `Ins_EIF', you
should be able to check the current IF nesting level.


    Werner



reply via email to

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