]> granicus.if.org Git - postgresql/commit
Improve ispell dictionary's defenses against bad affix files.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Oct 2014 17:11:45 +0000 (13:11 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Oct 2014 17:11:45 +0000 (13:11 -0400)
commit21fa26b6594dc064310bee1cf725c68591ab8032
tree318317de4cb53c533a3f950fbe07bcfa7de6520f
parentac6e8753707337d338e3a5fdb99d4f593ebc2df5
Improve ispell dictionary's defenses against bad affix files.

Don't crash if an ispell dictionary definition contains flags but not
any compound affixes.  (This isn't a security issue since only superusers
can install affix files, but still it's a bad thing.)

Also, be more careful about detecting whether an affix-file FLAG command
is old-format (ispell) or new-format (myspell/hunspell).  And change the
error message about mixed old-format and new-format commands into something
intelligible.

Per bug #11770 from Emre Hasegeli.  Back-patch to all supported branches.
src/backend/tsearch/spell.c