[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype
Subject:    Re: [ft] Random crash in FRABK.TTF
From:       Werner LEMBERG <wl () gnu ! org>
Date:       2007-04-09 8:45:16
Message-ID: 20070409.104516.150031759.wl () gnu ! org
[Download RAW message or body]


Sorry for the late reply.

> I think I have found reason for crash in case this font which has
> error in bytecode, is loaded after another font which leaves
> initialized "exec->zpX.n_points" to bigger number then 9.  Of course
> you need to have enabled bytecode interpreter.  It is not
> reproducible in ftview or ftstring because for first font it is
> initialized correctly.
> 
> I fixed it adding these lines into ttinterp.c:

Your fix looks good -- initialization of those variables don't do any
harm, I think.

>     exec->zp0.n_points   = 0;
>     exec->zp0.n_contours = 0;
>     exec->zp1.n_points   = 0;
>     exec->zp1.n_contours = 0;
>     exec->zp2.n_points   = 0;
>     exec->zp2.n_contours = 0;
> After these in method TT_Load_Context:
>     exec->pts.n_points   = 0;
>     exec->pts.n_contours = 0;

Please provide a patch with `diff -u' (and a separate ChangeLog entry).


    Werner


_______________________________________________
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic