[COMMITTERS] pgsql: Refine memory allocation in ICU conversions - Mailing list pgsql-committers

From Peter Eisentraut
Subject [COMMITTERS] pgsql: Refine memory allocation in ICU conversions
Date
Msg-id E1dRVFy-0000QY-6m@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Refine memory allocation in ICU conversions

The simple calculations done to estimate the size of the output buffers
for ucnv_fromUChars() and ucnv_toUChars() could overflow int32_t for
large strings.  To avoid that, go the long way and run the function
first without an output buffer to get the correct output buffer size
requirement.

Branch
------
master

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

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


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Clean up misuse and nonuse of poll_query_until().
Next
From: Peter Eisentraut
Date:
Subject: [COMMITTERS] pgsql: doc: Document that logical replication supports synchronousrepl