[Commits] [SCM] claws branch, master, updated. 4.2.0-29-g3c126fdf4

miras at claws-mail.org miras at claws-mail.org
Sun Jan 7 14:32:18 UTC 2024


The branch, master has been updated
       via  3c126fdf4d1c959a32aac666c70924479b067f61 (commit)
      from  41828b842604ac734bfba6c0669491d138c19c33 (commit)

Summary of changes:
 src/common/socket.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 3c126fdf4d1c959a32aac666c70924479b067f61
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sun Jan 7 15:32:08 2024 +0100

    Fix Bug #4728. Patch provided by Olaf Hering
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/common/socket.c b/src/common/socket.c
index 6e8bb745b..e9d50184b 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1256,6 +1256,7 @@ static gint ssl_read(gnutls_session_t ssl, gchar *buf, gint len)
 	}
 
 	while (1) {
+		errno = 0;
 		r = gnutls_record_recv(ssl, buf, len);
 		if (r > 0)
 			return r;
@@ -1273,7 +1274,10 @@ static gint ssl_read(gnutls_session_t ssl, gchar *buf, gint len)
 		case GNUTLS_E_INTERRUPTED:
 			errno = EAGAIN;
 			return -1;
-
+		case GNUTLS_E_PREMATURE_TERMINATION:
+			if (errno == 0)
+				return 0;
+			/* fall through */
 		default:
 			debug_print("Unexpected TLS read result %d\n", r);
 			errno = EIO;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list