Patch: fix intermittent crash in KHTML Thai Word Break

Germain Garand germain at ebooksfrance.org
Mon Feb 28 17:24:24 GMT 2005


Le lundi 28 Février 2005 16:41, Otto Pattara a écrit :
> On 2005 February 26 Saturday 02:17, Germain Garand wrote:
> > Le vendredi 25 Février 2005 05:38, Pattara Kiatisevi a écrit :
> > > Hello,
> > >
> > > Regarding the Thai word break patch in KHTML, after testing
>
> The backtrace seemed not very informative to me (maybe I need to
> enable debugging somehow (?) when compiling KHTML).
>
> I put some printf in libthai and found that sometimes the input
> parameter for array size (cache->allocated, in KHTML code) is
> incredibly large or the  cache->wbrpos array is 0x0. So I suspected
> there might be something funny about initialization of this "cache"
> structure. By looking at the code I don't see any mysterious point so
> I made a fix as in the patch.

Oh I see...  there is no proper initialization for th_brk. 
So then the only needed change should be:
- static th_brk_def th_brk;
+ static th_brk_def th_brk = 0;

no?

Greetings,
Germain




More information about the kfm-devel mailing list