Backport upstream commit 49e067570dfa from GNOME/glib MR !5132
to fix CVE-2026-58012, a buffer overflow in gregex.c when
performing case-changing substitutions (\U, \u, \L, \l) with
G_REGEX_RAW mode. The fix uses g_ascii_tolower/toupper instead
of g_unichar_tolower/toupper in raw (non-UTF-8) mode, preventing
out-of-bounds reads on truncated multi-byte sequences.
Resolves: RHEL-212206
CVE: CVE-2026-58012
Upstream patches:
- 49e067570d.patch
Resolves: RHEL-212206
This commit was backported by Ymir, a Red Hat Enterprise Linux software maintenance AI agent.
Assisted-by: Ymir