1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-10 09:21:58 +02:00

7 Commits

Author SHA1 Message Date
Collin Funk
73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08:00
Pádraig Brady
8a1f434463 tests: avoid false failure on older Linux kernels
* tests/fold/fold-zero-width.sh: Check the shell was able to create
the redirection file, as intermittently on CentOS 5,6,7 this wasn't
the case, with the shell giving an xmalloc failure due to the ulimit.
Reported by William Bader and Bruno Haible.
2025-09-21 16:37:26 +01:00
Pádraig Brady
70eb250fd7 tests: fold: avoid false failures on Solaris 10
* tests/fold/fold-characters.sh: Ensure we have independent verification
of the width of characters before testing based on those widths.
* tests/fold/fold-zero-width.sh: Likewise.
* tests/fold/fold.pl: Only compare the exit status,
as the error message can be translated.
2025-09-20 22:12:58 +01:00
Pádraig Brady
7c217bd8ac tests: avoid false failure on CentOS 5,6,7
* tests/fold/fold-zero-width.sh: Increase vm limit to avoid
failures on CentOS 5,6,7.  Match the limit used in write-errors.sh
as per commit v9.5-255-g0bd149403
2025-09-20 16:17:43 +01:00
Pádraig Brady
c95c7ee76f fold: fix write error checks with invalid multi-byte input
* src/fold.c (write_out): A new helper to check all writes.
(fold-file): Use write_out() for all writes.
* tests/fold/fold-zero-width.sh: Adjust to writing more
data in various patterns, rather than two buffers of NULs.
This is a more robust memory bound check, and the '\303' case
tests this particular logic change.
* NEWS: fold now exits immediately, not just promptly.
2025-09-16 18:41:51 +01:00
Pádraig Brady
dda853a4de tests: fold/fold-zero-width.sh: avoid false failure with ENOSPC
* tests/fold/fold-zero-width.sh: Check relatively large test file
is created appropriately.  Also apply more idomatic wc -l usage.
2025-09-16 14:00:44 +01:00
Collin Funk
98e5418a38 fold: fix out of bounds write with zero width characters
* src/fold.c (fold_file): Prefer putchar ('\n') to copying characters.
If we do not have room in the output buffer print it since it is not a
full line of text.
* tests/fold/fold-zero-width.sh: New test case.
* tests/local.mk (all_tests): Add it.
2025-09-15 20:55:56 -07:00