freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] those OVERFLOW_* macros and Fontval b69 (Re: Freetype-dev


From: Werner LEMBERG
Subject: Re: [ft-devel] those OVERFLOW_* macros and Fontval b69 (Re: Freetype-devel Digest, Vol 149, Issue 5
Date: Mon, 05 Jun 2017 05:56:34 +0200 (CEST)

>> Ditto for bytecode.  Checking every addition, subtraction or
>> multiplication for overflow is something I want to avoid,
> 
> Of course, I am only suggesting rejecting input with unreasonably
> large coordinates or metric values.

This would be ideal, yes, but I don't see how you can do that.  For
example, it makes sense to reject, say, PCF properties that exceed the
value 0x7FFF (I added such tests recently).  Similar things can be
done for other format too.  However, the majority of input data in
most formats are deltas, and here you would have to check after every
addition, subtraction, or multiplication whether you get something
`unreasonable'.


    Werner



reply via email to

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