> Message: 3
> Date: Sun, 04 Jun 2017 06:53:39 +0200
 (CEST)
> From: Werner LEMBERG <[email protected]>

...
> . Recently, integer overflow run-time
 checking was activated (again)
   for the fuzzer, causing a lot of
 minor code changes while applying
   fixes. ...

I have been following those new OVERFLOW_* macros... they are a bit ugly and 
mostly purely for suppressing warnings?

But it does seem to offer a convenient way of implementing the last two error 
checkings which FontVal 1.0 does that FontVal 2.x does not no yet. The other 
one is "drawing in non-twilight while in prep". (does it trash every glyph or 
get ignored by freetype?).

e.g. for your OVERFLOW_ADD_LONG() , if I undef your version locally in the 
truetype module, but define a new one as:

#define OVERFLOW_ADD_LONG(a,b) func_check_add_long(exc, (FT_ULong)a,(FT_ULong)b)

FT_Long func_check_add_long(TT_ExecContext exc, FT_ULong a, FT_ULong b)
{
 //...
 /* Do some checking and if it overflows, calls the function pointer in exc */
 //...
  return a + b ; /* your version */
}


What do you think? In fact perhaps if those macros are defined as inline 
functions, that would make it even easier?

_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to