From d20c1f89655635746b79692384e0eb66ef38cc507a5476ade5f3636b002c7c8c Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Tue, 12 May 2015 09:12:54 +0000 Subject: [PATCH] - Fix memory handling error with case insensitive sort using UTF-8 (boo#928749): * coreutils-i18n.patch: Allocate more memory as the upper form of some multi-byte characters may be 1 byte wider. OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=255 --- coreutils-i18n.patch | 4 ++-- coreutils-testsuite.changes | 8 ++++++++ coreutils.changes | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 024e47e..fbdf9ba 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -3261,8 +3261,8 @@ Index: src/sort.c + + if (ignore || translate) + { -+ char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1); -+ char *copy_b = copy_a + lena + 1; ++ char *copy_a = (char *) xmalloc((lena + lenb) * MB_CUR_MAX + 2); ++ char *copy_b = copy_a + (lena * MB_CUR_MAX) + 1; + size_t new_len_a, new_len_b; + size_t i, j; + diff --git a/coreutils-testsuite.changes b/coreutils-testsuite.changes index ff84b8d..ce627b4 100644 --- a/coreutils-testsuite.changes +++ b/coreutils-testsuite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 12 08:56:13 UTC 2015 - mail@bernhard-voelker.de + +- Fix memory handling error with case insensitive sort using UTF-8 + (boo#928749): + * coreutils-i18n.patch: Allocate more memory as the upper form of + some multi-byte characters may be 1 byte wider. + ------------------------------------------------------------------- Tue Apr 7 18:18:31 UTC 2015 - crrodriguez@opensuse.org diff --git a/coreutils.changes b/coreutils.changes index ff84b8d..ce627b4 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 12 08:56:13 UTC 2015 - mail@bernhard-voelker.de + +- Fix memory handling error with case insensitive sort using UTF-8 + (boo#928749): + * coreutils-i18n.patch: Allocate more memory as the upper form of + some multi-byte characters may be 1 byte wider. + ------------------------------------------------------------------- Tue Apr 7 18:18:31 UTC 2015 - crrodriguez@opensuse.org