mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
csplit: avoid buffer overrun when writing more than 999 files
Without this fix, seq 1000 | csplit - /./ '{*}' would write
the NUL-terminated file name, xx1000, into a buffer of size 6.
* src/csplit.c (main): Use properly sized file name buffer.
* NEWS (Bug fixes): Mention it.
* tests/misc/csplit-1000: New test to trigger the bug.
* tests/Makefile.am (TESTS): Add misc/csplit-1000.
This commit is contained in:
@@ -172,6 +172,7 @@ TESTS = \
|
||||
misc/chroot-fail \
|
||||
misc/comm \
|
||||
misc/csplit \
|
||||
misc/csplit-1000 \
|
||||
misc/date-sec \
|
||||
misc/dircolors \
|
||||
misc/df \
|
||||
|
||||
Reference in New Issue
Block a user