forked from pool/coreutils
Accepting request 306722 from Base:System
- Fix memory handling error with case insensitive sort using UTF-8 (boo#928749): coreutils-i18n.patch - Download keyring file from Savannah; prefer HTTPS over FTP for remote sources. OBS-URL: https://build.opensuse.org/request/show/306722 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=112
This commit is contained in:
commit
cd23ee8407
@ -7,7 +7,8 @@
|
||||
src/sort.c | 743 +++++++++++++++++++++++++++++++++++++++++---
|
||||
src/unexpand.c | 228 +++++++++++++
|
||||
src/uniq.c | 265 +++++++++++++++
|
||||
tests/local.mk | 1
|
||||
tests/i18n/sort.sh | 29 +
|
||||
tests/local.mk | 2
|
||||
tests/misc/cut.pl | 7
|
||||
tests/misc/expand.pl | 40 ++
|
||||
tests/misc/fold.pl | 50 ++
|
||||
@ -18,7 +19,7 @@
|
||||
tests/misc/unexpand.pl | 39 ++
|
||||
tests/misc/uniq.pl | 55 +++
|
||||
tests/pr/pr-tests.pl | 49 ++
|
||||
20 files changed, 3194 insertions(+), 180 deletions(-)
|
||||
21 files changed, 3224 insertions(+), 180 deletions(-)
|
||||
|
||||
Index: lib/linebuffer.h
|
||||
===================================================================
|
||||
@ -3261,8 +3262,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;
|
||||
+
|
||||
@ -4112,6 +4113,14 @@ Index: tests/local.mk
|
||||
tests/misc/sort-merge.pl \
|
||||
tests/misc/sort-merge-fdlimit.sh \
|
||||
tests/misc/sort-month.sh \
|
||||
@@ -516,6 +517,7 @@ all_tests = \
|
||||
tests/du/threshold.sh \
|
||||
tests/du/trailing-slash.sh \
|
||||
tests/du/two-args.sh \
|
||||
+ tests/i18n/sort.sh \
|
||||
tests/id/gnu-zero-uids.sh \
|
||||
tests/id/no-context.sh \
|
||||
tests/id/context.sh \
|
||||
Index: tests/misc/cut.pl
|
||||
===================================================================
|
||||
--- tests/misc/cut.pl.orig
|
||||
@ -4718,3 +4727,37 @@ Index: tests/pr/pr-tests.pl
|
||||
my $save_temps = $ENV{DEBUG};
|
||||
my $verbose = $ENV{VERBOSE};
|
||||
|
||||
Index: tests/i18n/sort.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ tests/i18n/sort.sh
|
||||
@@ -0,0 +1,29 @@
|
||||
+#!/bin/sh
|
||||
+# Verify sort's multi-byte support.
|
||||
+
|
||||
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
+print_ver_ sort
|
||||
+
|
||||
+export LC_ALL=en_US.UTF-8
|
||||
+locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \
|
||||
+ || skip_ "No UTF-8 locale available"
|
||||
+
|
||||
+# Enable heap consistency checkng on older systems
|
||||
+export MALLOC_CHECK_=2
|
||||
+
|
||||
+
|
||||
+# check buffer overflow issue due to
|
||||
+# expanding multi-byte representation due to case conversion
|
||||
+# https://bugzilla.suse.com/show_bug.cgi?id=928749
|
||||
+cat <<EOF > exp
|
||||
+.
|
||||
+ɑ
|
||||
+EOF
|
||||
+cat <<EOF | sort -f > out || fail=1
|
||||
+.
|
||||
+ɑ
|
||||
+EOF
|
||||
+compare exp out || { fail=1; cat out; }
|
||||
+
|
||||
+
|
||||
+Exit $fail
|
||||
|
@ -16,7 +16,7 @@ Index: tests/local.mk
|
||||
===================================================================
|
||||
--- tests/local.mk.orig
|
||||
+++ tests/local.mk
|
||||
@@ -661,14 +661,9 @@ all_tests = \
|
||||
@@ -662,14 +662,9 @@ all_tests = \
|
||||
# See tests/factor/create-test.sh.
|
||||
tf = tests/factor
|
||||
factor_tests = \
|
||||
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 12 09:32:53 UTC 2015 - mail@bernhard-voelker.de
|
||||
|
||||
- Download keyring file from Savannah; prefer HTTPS over FTP
|
||||
for remote sources.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
src/sort.c (keycompare_mb): Ensure the buffer is big enough
|
||||
to handle anything output from wctomb(). Theoretically any
|
||||
input char could be converted to multiple output chars,
|
||||
and so we need to multiply the storage by MB_CUR_MAX.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 7 18:18:31 UTC 2015 - crrodriguez@opensuse.org
|
||||
|
||||
|
@ -82,9 +82,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# For upgrading you now just need to increase the version, remove the old
|
||||
# tarballs, then run osc service localrun download_files, osc addremove,
|
||||
# osc vc and osc ci and you are done.
|
||||
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
||||
Source2: %{name}.keyring
|
||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
||||
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring
|
||||
%else
|
||||
# In "coreutils-testsuite", we use the version controlled file from "coreutils".
|
||||
# otherwise that file would be downloaded twice during the above mentioned
|
||||
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 12 09:32:53 UTC 2015 - mail@bernhard-voelker.de
|
||||
|
||||
- Download keyring file from Savannah; prefer HTTPS over FTP
|
||||
for remote sources.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
src/sort.c (keycompare_mb): Ensure the buffer is big enough
|
||||
to handle anything output from wctomb(). Theoretically any
|
||||
input char could be converted to multiple output chars,
|
||||
and so we need to multiply the storage by MB_CUR_MAX.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 7 18:18:31 UTC 2015 - crrodriguez@opensuse.org
|
||||
|
||||
|
Binary file not shown.
@ -82,9 +82,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# For upgrading you now just need to increase the version, remove the old
|
||||
# tarballs, then run osc service localrun download_files, osc addremove,
|
||||
# osc vc and osc ci and you are done.
|
||||
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
||||
Source2: %{name}.keyring
|
||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
||||
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring
|
||||
%else
|
||||
# In "coreutils-testsuite", we use the version controlled file from "coreutils".
|
||||
# otherwise that file would be downloaded twice during the above mentioned
|
||||
|
Loading…
Reference in New Issue
Block a user