Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arthur Zakirov <zaartur@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers@postgresql.org,
Teodor Sigaev <teodor@sigaev.ru>
Date: 2019-11-02T20:48:00Z
Lists: pgsql-hackers
Arthur Zakirov <zaartur@gmail.com> writes: > On 2019/10/13 10:26, Tomas Vondra wrote: >> So I think we need some sort of cross-check here. We certainly need to >> make NISortDictionary() check the affix value is within AffixData >> bounds, and error out when the index is non-sensical (maybe negative >> and/or exceeding nAffixData). > I agree, I attached the patch which do this. I also added couple > asserts, tests and fixed condition in getAffixFlagSet(): > - if (curaffix > 0 && curaffix <= Conf->nAffixData) > + if (curaffix > 0 && curaffix < Conf->nAffixData) Looks reasonable to me, and we need to get something done before the upcoming releases, so I pushed this. Perhaps there's more that could be done later. regards, tom lane
Commits
-
Validate ispell dictionaries more carefully.
- 8af1624e3f0e 13.0 landed
- 680aabd2f9e8 10.11 landed
- 65cdf8bc1be4 11.6 landed
- 51b9ac5588bc 9.6.16 landed
- 43753c2cfbdd 12.1 landed