Subject: CVS commit: src/usr.bin/mail
To: None <source-changes@NetBSD.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 11/01/2006 16:42:27
Module Name:	src
Committed By:	christos
Date:		Wed Nov  1 16:42:27 UTC 2006

Modified Files:
	src/usr.bin/mail: mime_decode.c

Log Message:
From Anon Ymous:
The problem is that mime_decode_close() closes all files registered
after mip->mi_pipe_end and this is getting set in mime_sendmessage()
after a fflush().

When you print a large number of messages fflush() blocks and prevents
mip->mi_pipe_end from getting set before the SIGPIPE comes in and
jumps to the close block that calls mime_decode_close().  As a result,
mime_decode_close() was closing all the registered files including
obuf (mi_pipe_end was NULL).


To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 src/usr.bin/mail/mime_decode.c

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