From 8560d7254ba1cbf29f5b6941e65c1619c01b33a6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 16 Nov 2003 11:52:08 +0000 Subject: Add test to detect this. This would fail due to reading from freed buffer with coreutils-5.0.91. --- tests/misc/csplit | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/misc/csplit') diff --git a/tests/misc/csplit b/tests/misc/csplit index b0cb1faae..2d04fee7f 100755 --- a/tests/misc/csplit +++ b/tests/misc/csplit @@ -36,6 +36,14 @@ cmp out exp || fail=1 test $fail = 1 && diff out exp 2> /dev/null rm -f in out exp +# Ensure that xx02 contains just two newlines. +# This would fail due to reading from freed buffer with coreutils-5.0.91. +printf '\n\n' > exp +cp xx02 out || fail=1 +cmp out exp || fail=1 +test $fail = 1 && diff out exp 2> /dev/null +rm -f in out exp + # csplit would infloop (echo; echo a) > in csplit in '/a/-1' '{*}' > out || fail=1 -- cgit v1.2.3-54-g00ecf