Gitweb:
https://git.exim.org/exim.git/commitdiff/c9f1be94cc304f0343c93b66efa41a747d307fb1
Commit: c9f1be94cc304f0343c93b66efa41a747d307fb1
Parent: 81a559c80ccd6a0354b5485720c0205a69289fb5
Author: Bruce Lee <straightblast426@???>
AuthorDate: Tue Jul 30 22:43:14 2019 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Fri Aug 2 13:27:42 2019 +0100
Auth: handle socket read errors in Dovecot authenticator
---
src/src/auths/dovecot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/src/auths/dovecot.c b/src/src/auths/dovecot.c
index 9c0c9b3..4628863 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;
}