From d7f14c41afe8dacdd2d978fd7698db439955044b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Mon, 26 Jan 2026 13:49:52 +0100 Subject: [PATCH] fold: fix processing of malformed UTF-8 sequences Resolves: RHEL-140117 --- 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 429675f..0dfd737 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 f744353..f7a6c5d 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.30 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv3+ Group: System Environment/Base Url: https://www.gnu.org/software/coreutils/ @@ -296,6 +296,9 @@ fi %license COPYING %changelog +* Mon Jan 26 2026 Lukáš Zaoral - 8.30-17 +- fold: fix processing of malformed UTF-8 sequences (RHEL-140117) + * Wed Oct 29 2025 Lukáš Zaoral - 8.30-16 - fix du being killed by SIGABRT on mutating xfs systems (RHEL-124174)