ICU: check for U_STRING_NOT_TERMINATED_WARNING.
Jeff Davis <jdavis@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/pg_locale.c | modified | +11 −18 |
| src/bin/initdb/initdb.c | modified | +4 −11 |
Discussion
- Order changes in PG16 since ICU introduction 115 messages · 2023-04-21 → 2023-06-16