dict_synonym.c: remove incorrect outlen.

Jeff Davis <jdavis@postgresql.org>

Commit: 1e04581729421944e18f4a4a10f6d7a8a8e95169
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2026-06-08T18:49:27Z
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/1101e1a3afbbabb503317069c40374b82e6f4cac.camel@j-davis.com
Reviewed-by: Tristan Partin <tristan@partin.io>
Backpatch-through: 14

Files

PathChange+/−
src/backend/tsearch/dict_synonym.c modified +1 −3