From: Bruce Lee Date: Tue, 30 Jul 2019 21:43:14 +0000 (+0100) Subject: Auth: handle socket read errors in Dovecot authenticator X-Git-Tag: exim-4.93-RC0~116 X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=commitdiff_plain;h=c9f1be94cc304f0343c93b66efa41a747d307fb1 Auth: handle socket read errors in Dovecot authenticator --- diff --git a/src/src/auths/dovecot.c b/src/src/auths/dovecot.c index 9c0c9b313..4628863e0 100644 --- a/src/src/auths/dovecot.c +++ b/src/src/auths/dovecot.c @@ -215,8 +215,8 @@ for (;;) { if (socket_buffer_left == 0) { - socket_buffer_left = read(fd, sbuffer, sizeof(sbuffer)); - if (socket_buffer_left == 0) { if (count == 0) return NULL; else break; } + if ((socket_buffer_left = read(fd, sbuffer, sizeof(sbuffer))) <= 0) + if (count == 0) return NULL; else break; p = 0; }