Re: Potential buffer overrun in spell.c's CheckAffix()
x4mmm@yandex-team.ru
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2026-04-30T07:56:17Z
Lists: pgsql-bugs
> On 23 Apr 2026, at 12:58, Andrey Borodin <x4mmm@yandex-team.ru> wrote: > > Yes, 40Kb in NIImportOOAffixes() is a lot. But is it important in grand scheme of > things? Minimum max_stack_depth is 100Kb, ought to be enough… IsAffixFlagInUse(), addCompoundAffixFlagValue() and getCompoundAffixFlagValue() also allocate 8Kb on stack... Would it make sense to add check_stack_depth() into addCompoundAffixFlagValue()? Other prominent allocators (NIImportOOAffixes(),NIImportAffixes()) call it anyway. At least we will know if disaster is around the corner. Best regards, Andrey Borodin.
Commits
-
Prevent some buffer overruns in spell.c's parsing of affix files.
- ea5f0d176a9d 17.10 landed
- d7970e7e951b 19 (unreleased) landed
- 42383d32d78a 16.14 landed
- 21a24d709500 14.23 landed
- 0b196d3db713 15.18 landed
- 00c6e08195d5 18.4 landed
-
Prevent buffer overrun in spell.c's CheckAffix().
- 6cae0c2bd211 14.23 landed
- f852c9093fb0 15.18 landed
- 17f72e037f20 16.14 landed
- a5426dbf8415 17.10 landed
- c2bfeb3bbaa7 18.4 landed
- 844bb90d49f7 19 (unreleased) landed