From: Timo Sirainen Date: Wed, 27 Oct 2021 10:06:10 +0000 (+0200) Subject: lib-ssl-iostream: Fix assert-crash when OpenSSL returns syscall error without errno X-Git-Tag: 2.3.17.1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f10f77c4014a39fe2a4a6b4d25e34fcb96b6ca28;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: Fix assert-crash when OpenSSL returns syscall error without errno Incomplete fix in f41874b3dec541478a85275698a91f089f537df2 Fixes: Panic: file istream-openssl.c: line 51 (i_stream_ssl_read_real): assertion failed: (errno != 0) --- diff --git a/src/lib-ssl-iostream/iostream-openssl.c b/src/lib-ssl-iostream/iostream-openssl.c index 5d11526f11..ffc524d4c1 100644 --- a/src/lib-ssl-iostream/iostream-openssl.c +++ b/src/lib-ssl-iostream/iostream-openssl.c @@ -609,6 +609,7 @@ int openssl_iostream_handle_error(struct ssl_iostream *ssl_io, int ret, } else { /* Seen this at least with v1.1.0l SSL_accept() */ errstr = "OpenSSL BUG: errno=0"; + errno = EINVAL; } errstr = t_strdup_printf("%s syscall failed: %s", func_name, errstr);