pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_locale.c: Fix REL_18_STABLE for srclen < 0.
Date: Tue, 18 Aug 2026 01:06:34 +0000
Message-ID: <E1ww8Hh-00000000zTI-3ZhK@gemulon.postgresql.org> (raw)

pg_locale.c: Fix REL_18_STABLE for srclen < 0.

Ensure that srclen >= 0 before calling strlower_c(), etc.

Commit 5f003855e7 backported strlower_c(), etc., to 18, but did not
account for the srclen < 0 behavior that existed in 18 (and was
removed later in version 19 with commit 6d22c67c3b).

No callers in core use the srclen < 0 behavior, but it's possible
(though unlikely) that extensions do.

This applies to REL_18_STABLE only.

Discussion: https://postgr.es/m/v36ssaygf7grb3qzfsjhtdzi7kqd45ds56nyuf7gi5qjml4qbb@ezmfqzmhlrs2

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/27e2afb492cd553093c92ea917d24651b5a9ae16

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 8 ++++++++
1 file changed, 8 insertions(+)



Message-ID: <E1ww8Hh-00000000zTI-3ZhK@gemulon.postgresql.org>
Permalink:  ../E1ww8Hh-00000000zTI-3ZhK@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ww8Hh-00000000zTI-3ZhK@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_locale.c: Fix REL_18_STABLE for srclen < 0.
  In-Reply-To: <E1ww8Hh-00000000zTI-3ZhK@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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