aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/copyfromparse.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-08-24 13:01:40 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-08-24 13:01:40 -0400
commit444ec169a7def141f9520c1111a31c8a5dda22ce (patch)
tree7758cc97167bc60149934dde9a800a588504decc /src/backend/commands/copyfromparse.c
parent04f1013be084a12a251c7087b06664d0918755e6 (diff)
downloadpostgresql-444ec169a7def141f9520c1111a31c8a5dda22ce.tar.gz
postgresql-444ec169a7def141f9520c1111a31c8a5dda22ce.zip
Defend against stack overrun in a few more places.
SplitToVariants() in the ispell code, lseg_inside_poly() in geo_ops.c, and regex_selectivity_sub() in selectivity estimation could recurse until stack overflow; fix by adding check_stack_depth() calls. So could next() in the regex compiler, but that case is better fixed by converting its tail recursion to a loop. (We probably get better code that way too, since next() can now be inlined into its sole caller.) There remains a reachable stack overrun in the Turkish stemmer, but we'll need some advice from the Snowball people about how to fix that. Per report from Egor Chindyaskin and Alexander Lakhin. These mistakes are old, so back-patch to all supported branches. Richard Guo and Tom Lane Discussion: https://postgr.es/m/1661334672.728714027@f473.i.mail.ru
Diffstat (limited to 'src/backend/commands/copyfromparse.c')
0 files changed, 0 insertions, 0 deletions