[COMMITTERS] pgsql: Refine memory allocation in ICU conversions
[COMMITTERS] pgsql: Refine memory allocation in ICU conversions
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
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(-)