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: ICU: check for U_STRING_NOT_TERMINATED_WARNING.
Date: Wed, 17 May 2023 21:24:03 +0000
Message-ID: <E1pzOct-000OX3-HO@gemulon.postgresql.org> (raw)

ICU: check for U_STRING_NOT_TERMINATED_WARNING.

Fixes memory error in cases where the length of the language name
returned by uloc_getLanguage() is exactly ULOC_LANG_CAPACITY, in which
case the status is set to U_STRING_NOT_TERMINATED_WARNING.

Also check in call sites for other ICU functions that are expected to
return a C string to be safe (no bug is known at these other call
sites).

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/2098874d-c111-41e4-9063-30bcf135226b@gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 29 +++++++++++------------------
src/bin/initdb/initdb.c           | 15 ++++-----------
2 files changed, 15 insertions(+), 29 deletions(-)



Message-ID: <E1pzOct-000OX3-HO@gemulon.postgresql.org>
Permalink:  ../E1pzOct-000OX3-HO@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pzOct-000OX3-HO@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: ICU: check for U_STRING_NOT_TERMINATED_WARNING.
  In-Reply-To: <E1pzOct-000OX3-HO@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