]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Validate ispell dictionaries more carefully.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 2 Nov 2019 20:45:32 +0000 (16:45 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 2 Nov 2019 20:45:32 +0000 (16:45 -0400)
commit680aabd2f9e88a1cb9e4808682a00ad50c2acf52
treea9612f7d5d597275aa33a8386e18f5df362a01a3
parentb99bfc3c96f16c4e08bc1276cee95f01bcc09bf3
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
src/backend/tsearch/spell.c
src/test/regress/expected/tsdicts.out
src/test/regress/sql/tsdicts.sql