]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix memory-safety bugs in the ispell/hunspell dictionary loader.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Aug 2026 17:22:39 +0000 (13:22 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Aug 2026 17:22:39 +0000 (13:22 -0400)
commit330a72052cd166894557eff8b4e30e96174b205f
tree3c6351b03e34729517bffa53272dcf45d4f47326
parent6ca405938d4d65d1979460421ac3327a98a42d44
Fix memory-safety bugs in the ispell/hunspell dictionary loader.

Allocate CompoundAffix with room for its terminator, initialize the
old-format flag buffer before NIAddAffix(), and reject incomplete or
missing Hunspell AF aliases.  None of these errors would be likely to
trigger on real dictionary files, accounting for the lack of previous
reports; but they're certainly bugs.

Bug: #19595
Reported-by: Michael Malis <michaelmalis2@gmail.com>
Author: Andrey Rachitskiy <pl0h0yp1@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19595-7dc18b4e212c4757@postgresql.org
Backpatch-through: 14
src/backend/tsearch/spell.c