Re: Text search segmentation fault
| От | Grzegorz Jaśkiewicz |
|---|---|
| Тема | Re: Text search segmentation fault |
| Дата | |
| Msg-id | 2f4958ff0901290709o1b1695e3l4ef455f2fdcbbc7e@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Text search segmentation fault (Tommy Gildseth <tommy.gildseth@usit.uio.no>) |
| Ответы |
Re: Text search segmentation fault
|
| Список | pgsql-general |
if it's
static uint32
makeCompoundFlags(IspellDict *Conf, int affix)
{
uint32 flag = 0;
char *str = Conf->AffixData[affix];
while (str && *str)
{
flag |= Conf->flagval[(unsigned int) *str];
str++;
}
return (flag & FF_DICTFLAGMASK);
}
Than I have quite few notes about that function:
- affix is not checked on entry, and should be unsigned,
- for sake of safety uint32_t should be used instead of unsigned int,
in the cast
- there should be some safety limit for lenght of str,
В списке pgsql-general по дате отправления: