Subject: CVS commit: src
To: None <source-changes@netbsd.org>
From: Juergen Hannken-Illjes <hannken@netbsd.org>
List: source-changes
Date: 04/26/1999 02:16:00
Module Name:	src
Committed By:	hannken
Date:		Mon Apr 26 09:15:59 UTC 1999

Modified Files:
	src/bin/cat: cat.c
Log Message:
Fix buffer allocation in function `raw_cat'. It was possible to get a
buffer size of zero if stdout has a block size of 0.
The command `rsh <host> cat <files>' gives no output and no error.

- Allocate a minimum of BUFSIZ bytes for buffer.
- Use a static buffer if either `fstat' or `malloc' fails.
- Do the allocation once since stdout will not change block size.