dovecot-2.2: lib-ssl-iostream: Avoid assert-crash when reading a...

dovecot at dovecot.org dovecot at dovecot.org
Sun Aug 12 09:57:31 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/d7df4855dc94
changeset: 14880:d7df4855dc94
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Aug 12 09:57:20 2012 +0300
description:
lib-ssl-iostream: Avoid assert-crash when reading a closed stream.

diffstat:

 src/lib-ssl-iostream/iostream-openssl.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r ed07971b21ea -r d7df4855dc94 src/lib-ssl-iostream/iostream-openssl.c
--- a/src/lib-ssl-iostream/iostream-openssl.c	Sun Aug 12 08:36:06 2012 +0300
+++ b/src/lib-ssl-iostream/iostream-openssl.c	Sun Aug 12 09:57:20 2012 +0300
@@ -312,7 +312,8 @@
 		   fully succeed or completely fail due to some error. */
 		sent = o_stream_send(ssl_io->plain_output, buffer, bytes);
 		if (sent < 0) {
-			i_assert(ssl_io->plain_output->stream_errno != 0);
+			i_assert(ssl_io->plain_output->closed ||
+				 ssl_io->plain_output->stream_errno != 0);
 			ssl_io->plain_stream_errno =
 				ssl_io->plain_output->stream_errno;
 			ssl_io->closed = TRUE;


More information about the dovecot-cvs mailing list