Subject: pgsql: unicode_case.c: defend against truncated UTF8.

From: Jeff Davis <[email-masked]>
Date: Tue, 07 Jul 2026 20:36:29 +0000

unicode_case.c: defend against truncated UTF8.

Reviewed-by: Chao Li <[email-masked]>
Discussion: https://postgr.es/m/[email-masked]
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5e78ebca57b3630c1230d348263fddfeaaf7678e

Modified Files
--------------
src/backend/utils/adt/formatting.c | 24 ++++++++++++++++++------
src/common/unicode/case_test.c     |  9 +++++++++
src/common/unicode_case.c          | 33 +++++++++++++++++++++++++++++----
3 files changed, 56 insertions(+), 10 deletions(-)