Subject: CVS commit: src/usr.bin/cut
To: None <source-changes@NetBSD.org>
From: David Laight <dsl@netbsd.org>
List: source-changes
Date: 03/30/2006 19:17:44
Module Name:	src
Committed By:	dsl
Date:		Thu Mar 30 19:17:44 UTC 2006

Modified Files:
	src/usr.bin/cut: cut.c

Log Message:
If fgetln() returns a buffer that isn't terminated by \n, free the temporary
buffer inside the loop.  Fixes coverty CID:1674.
(This should only happen at EOF, so the loop SHOULD terminate.)
While here always output a newline at the end of the input data even when
the last (unterminated) line doesn't contain a separator.


To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 src/usr.bin/cut/cut.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.