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/[email protected] 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(-)
