Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:Update
coreutils.14824
coreutils-sort-i18n-human.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File coreutils-sort-i18n-human.patch of Package coreutils.14824
From 3976ef5a20369d8b490907ab2cba2d617305a5e0 Mon Sep 17 00:00:00 2001 From: Kamil Dudka <kdudka@redhat.com> Date: Mon, 30 May 2016 16:19:20 +0200 Subject: [PATCH] sort: do not use static array 'blanks' in human_numcompare() ... because the array is not initialized with MB locales. Note this is rather a conservative fix. I plan to do more cleanup of the i18n patch in Fedora to prevent mistakes like this in future updates of coreutils. --- src/sort.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sort.c b/src/sort.c index 9e07ad8..e47b039 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2274,12 +2274,10 @@ find_unit_order (char const *number) <none/unknown> < K/k < M < G < T < P < E < Z < Y */ static int -human_numcompare (char const *a, char const *b) +human_numcompare (char *a, char *b) { - while (blanks[to_uchar (*a)]) - a++; - while (blanks[to_uchar (*b)]) - b++; + skipblanks(&a, a + strlen(a)); + skipblanks(&b, b + strlen(b)); int diff = find_unit_order (a) - find_unit_order (b); return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); -- 2.5.5
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor