From a921d1b238a341c5196e2a726e106892fbc6402f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Mon, 20 Sep 2010 13:19:42 +0200 Subject: [PATCH] change assertion failure for invalid multibyte input in sort to less confusing error message(#591352) --- coreutils-i18n.patch | 5 +++-- coreutils.spec | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index d6e6c46..9bd30c6 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -2932,7 +2932,7 @@ diff -urNp coreutils-8.5-orig/src/sort.c coreutils-8.5/src/sort.c { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2062,11 +2390,79 @@ compare_version (char *restrict texta, s +@@ -2062,11 +2390,80 @@ compare_version (char *restrict texta, s return diff; } @@ -2969,7 +2969,8 @@ diff -urNp coreutils-8.5-orig/src/sort.c coreutils-8.5/src/sort.c + memset (&state, '\0', sizeof(mbstate_t)); + + wclength = mbsrtowcs (month_wcs, pp, len + 1, &state); -+ assert (wclength != (size_t)-1 && *pp == NULL); ++ if (wclength == (size_t)-1 || *pp != NULL) ++ error (SORT_FAILURE, 0, _("Invalid multibyte input %s."), quote(s)); + + for (i = 0; i < wclength; i++) + { diff --git a/coreutils.spec b/coreutils.spec index 3774910..79fc848 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.5 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -344,6 +344,10 @@ fi %{_libdir}/coreutils %changelog +* Mon Sep 20 2010 Ondrej Vasik - 8.5-8 +- change assertion failure for invalid multibyte input + in sort to less confusing error message(#591352) + * Wed Sep 09 2010 Ondrej Vasik - 8.5-7 - add RELRO protection to su as well (#630017)