Hello!
OK. I have changed it from 128 to 512.
I think that will be enough in any case :-)
We don't want to add any checking because this
place is executed for every word and additional
code will slow down indexer a bit.
Thanks for noticing and reporting.
Regards.
Danil Lavrentyuk wrote:
>
> Hello!
>
> char ** UdmNormalizeWord (char *word)
> {
> ...
> char **forms, **cur;
> ...
> forms=(char **)malloc(128*sizeof(char **));
> *(cur=forms) = NULL;
> ...
> Later it many times do:
>
> *cur=strdup(newword);
> cur++;*cur=NULL;
>
> And no any checks if *cur have not ran out of forms array.
>
> Yes, I think I'll not find in Russian (my native lang) a word having so
> many normal forms. :-)
> But what about other languages? Who is competent enough to guarantee?
> Think to check number of words found will be more safe.
--
Alexander Barkov
IZHCOM, Izhevsk
email: [EMAIL PROTECTED] | http://www.izhcom.ru
Phone: +7 (3412) 51-32-11 | Fax: +7 (3412) 78-70-10
ICQ: 7748759
______________
If you want to unsubscribe send "unsubscribe udmsearch"
to [EMAIL PROTECTED]