From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c)
Date: Thu, 12 Apr 2018 18:14:03 -0400
Message-ID: <23884.1523571243@sss.pgh.pa.us> (raw)
In-Reply-To: <20180412115638.GA19444@zakirov.localdomain>
References: <152353327780.31225.13445405496721177988@wrigleys.postgresql.org>
<20180412115638.GA19444@zakirov.localdomain>
Arthur Zakirov <a.zakirov@postgrespro.ru> writes:
>> 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.
Yeah, existing code is clearly wrong, patch looks OK, will push.
But I see from the code coverage report that this bit is unexercised
in the regression tests. Any chance of getting a test that covers
this? I'm worried that this means we also lack any coverage of
cases where the CompoundAffix array has more than one entry.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, a.zakirov@postgrespro.ru, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c)
In-Reply-To: <23884.1523571243@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox