pgsql: Validate ispell dictionaries more carefully. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Validate ispell dictionaries more carefully.
Date
Msg-id E1iR0HO-0007xF-Pm@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Validate ispell dictionaries more carefully.

Using incorrect, or just mismatched, dictionary and affix files
could result in a crash, due to failure to cross-check offsets
obtained from the file.  Add necessary validation, as well as
some Asserts for future-proofing.

Per bug #16050 from Alexander Lakhin.  Back-patch to 9.6 where the
problem was introduced.

Arthur Zakirov, per initial investigation by Tomas Vondra

Discussion: https://postgr.es/m/16050-024ae722464ab604@postgresql.org
Discussion: https://postgr.es/m/20191013012610.2p2fp3zzpoav7jzf@development

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/43753c2cfbdd9870e68671abcc9dd377881071b0

Modified Files
--------------
src/backend/tsearch/spell.c           | 25 ++++++++++++++++++++---
src/test/regress/expected/tsdicts.out | 34 ++++++++++++++++++++++++++++++++
src/test/regress/sql/tsdicts.sql      | 37 +++++++++++++++++++++++++++++++++++
3 files changed, 93 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix failure when creating cloned indexes for a partition
Next
From: Tom Lane
Date:
Subject: pgsql: Fix PG_GETARG_SEG_P() definition.