From e7b758a0a77e488d09bccd898f9843d565320a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 15 Jan 2026 14:25:57 +0100 Subject: [PATCH] fold: fix processing of malformed UTF-8 sequences Resolves: RHEL-136086 --- coreutils-i18n.patch | 3 ++- coreutils.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 0eb3851..c323cff 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -203,7 +203,7 @@ index 8cd0d6b..d23edd5 100644 /* Look for the last blank. */ while (logical_end) { -@@ -215,11 +252,221 @@ fold_file (char const *filename, size_t width) +@@ -215,11 +252,222 @@ fold_file (char const *filename, size_t width) line_out[offset_out++] = c; } @@ -282,6 +282,7 @@ index 8cd0d6b..d23edd5 100644 + + /* Get a wide character. */ + state_bak = state; ++ convfail = 0; + mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &state); + + switch (mblength) diff --git a/coreutils.spec b/coreutils.spec index e2be502..724c042 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.32 -Release: 39%{?dist} +Release: 40%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/coreutils/ Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz @@ -333,6 +333,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %license COPYING %changelog +* Thu Jan 15 2026 Lukáš Zaoral - 8.32-40 +- fold: fix processing of malformed UTF-8 sequences (RHEL-136086) + * Mon Dec 09 2024 Lukáš Zaoral - 8.32-39 - fix sort fdlimit test failures on s390x with /dev/z90crypt (RHEL-60290)