| From: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
|---|---|
| To: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c) |
| Date: | 2018-04-12 11:56:39 |
| Message-ID: | 20180412115638.GA19444@zakirov.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hello,
> Bug reference: 15150
> Logged by: Alexander Lakhin
> Email address: exclusion(at)gmail(dot)com
> PostgreSQL version: 10.3
> Operating system: Debian-8
> Description:
>
> It looks that the following condition in NISortAffixes(IspellDict *Conf)
> uses uninitialised ptr->issuffix:
>
> if (ptr == Conf->CompoundAffix ||
> ptr->issuffix != (ptr - 1)->issuffix ||
Yes, you are right. The second condition isn't right. Instead of
"ptr->issuffix != (ptr - 1)->issuffix" "Affix->type" should be checked
because we check for uniqueness of affixes.
The patch is attached.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
| Attachment | Content-Type | Size |
|---|---|---|
| fix-NISortAffixes-condition.patch | text/plain | 910 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2018-04-12 12:20:09 | BUG #15151: Error with wal replay after planned manual switchover. |
| Previous Message | PG Bug reporting form | 2018-04-12 11:41:17 | BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c) |