dict_synonym.c: remove incorrect outlen.

Previously, outlen was miscalculated if case_sensitive was false and
str_tolower() changed the byte length of the string. If outlen was too
large, pnstrdup() would stop at the NUL terminator, preventing
overrun. But if outlen was too small, it would cause truncation.

Fix by just removing outlen. It was only used in a single site, which
could just as well use pstrdup().

Discussion: 
https://postgre.es/m/[email protected]
Reviewed-by: Tristan Partin <[email protected]>
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3805641cbc1e8fba1c6f82802ea1c4f7d1cae026

Modified Files
--------------
src/backend/tsearch/dict_synonym.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Reply via email to