agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: dict_synonym.c: remove incorrect outlen.
6+ messages / 1 participants
[nested] [flat]

* pgsql: dict_synonym.c: remove incorrect outlen.
@ 2026-06-08 18:54 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2026-06-08 18:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9234e333711ef9875a4cef31889e88439421c396

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: dict_synonym.c: remove incorrect outlen.
@ 2026-06-08 18:54 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2026-06-08 18:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/89e6484985280b259a2346b4b4805750cf6ac0ce

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: dict_synonym.c: remove incorrect outlen.
@ 2026-06-08 18:54 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2026-06-08 18:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: dict_synonym.c: remove incorrect outlen.
@ 2026-06-08 18:54 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2026-06-08 18:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a7e0e42a226dc99f62987237d8356a7536f1890a

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: dict_synonym.c: remove incorrect outlen.
@ 2026-06-08 18:54 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2026-06-08 18:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b32df590cce605389415c9b42b87f02bc0d623b8

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: dict_synonym.c: remove incorrect outlen.
@ 2026-06-08 18:54 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2026-06-08 18:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1e04581729421944e18f4a4a10f6d7a8a8e95169

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-06-08 18:54 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-08 18:54 pgsql: dict_synonym.c: remove incorrect outlen. Jeff Davis <jdavis@postgresql.org>
2026-06-08 18:54 pgsql: dict_synonym.c: remove incorrect outlen. Jeff Davis <jdavis@postgresql.org>
2026-06-08 18:54 pgsql: dict_synonym.c: remove incorrect outlen. Jeff Davis <jdavis@postgresql.org>
2026-06-08 18:54 pgsql: dict_synonym.c: remove incorrect outlen. Jeff Davis <jdavis@postgresql.org>
2026-06-08 18:54 pgsql: dict_synonym.c: remove incorrect outlen. Jeff Davis <jdavis@postgresql.org>
2026-06-08 18:54 pgsql: dict_synonym.c: remove incorrect outlen. Jeff Davis <jdavis@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox