pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Validate ispell dictionaries more carefully.
Date: Sat, 02 Nov 2019 20:45:50 +0000
Message-ID: <E1iR0HO-0007xE-PR@gemulon.postgresql.org> (raw)

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8af1624e3f0efd2d029217a91d07bd3795f080a6

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(-)



view thread (5+ messages)

Message-ID: <E1iR0HO-0007xE-PR@gemulon.postgresql.org>
Permalink:  ../E1iR0HO-0007xE-PR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iR0HO-0007xE-PR@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Validate ispell dictionaries more carefully.
  In-Reply-To: <E1iR0HO-0007xE-PR@gemulon.postgresql.org>
  References: <E1iR0HO-0007xE-PR@gemulon.postgresql.org>

* 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