Problem reported by Michał Majchrowicz.
* src/uniq.c (find_field): Fix typo.
* tests/uniq/uniq.pl (add_z_variants): Test for the bug.
mistakenly exit with a nonzero status.
[This bug was present in "the beginning".]
mistakenly exit with a nonzero status.
[This bug was present in "the beginning".]
+ 'uniq -w' no longer overruns the read buffer in multibyte locales.
+ [bug introduced in coreutils-9.5]
+
* Noteworthy changes in release 9.11 (2026-04-20) [stable]
* Noteworthy changes in release 9.11 (2026-04-20) [stable]
Michal Politowski mpol@charybda.icm.edu.pl
Michal Svec msvec@suse.cz
Michal Trunecka mtruneck@redhat.com
Michal Politowski mpol@charybda.icm.edu.pl
Michal Svec msvec@suse.cz
Michal Trunecka mtruneck@redhat.com
+Michał Majchrowicz mmajchrowicz@afine.com
Michel Robitaille robitail@IRO.UMontreal.CA
Michiel Bacchiani bacchian@raven.bu.edu
Mike Castle dalgoda@ix.netcom.com
Michel Robitaille robitail@IRO.UMontreal.CA
Michiel Bacchiani bacchian@raven.bu.edu
Mike Castle dalgoda@ix.netcom.com
- for (idx_t i = check_chars; 0 < i && lp < lim; i--)
- ep += mcel_scan (lp, lim).len;
+ for (idx_t i = check_chars; 0 < i && ep < lim; i--)
+ ep += mcel_scan (ep, lim).len;
" - 'separate'\n" .
" - 'both'\n" .
"Try '$prog --help' for more information.\n"}],
" - 'separate'\n" .
" - 'both'\n" .
"Try '$prog --help' for more information.\n"}],
+ # Test for read buffer overrun.
+ do { my $longline = "\360\237\230\200" . "A" x 255 . "\n";
+ ['146', '-w256', {IN => $longline x 2}, {OUT => $longline}] },
);
# Locale related tests
);
# Locale related tests