summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-11-25 17:10:08 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-11-25 17:10:08 +0200
commit19233e13006c839503c5a814184d7792a48bd907 (patch)
treedb9deeac61f6c636bab4e27df87fac479105b568
parentf10431e7fd3cd3378b5442125382f86a9566b205 (diff)
downloadmailutils-19233e13006c839503c5a814184d7792a48bd907.tar.gz
mailutils-19233e13006c839503c5a814184d7792a48bd907.tar.bz2
Bugfixes
* imap4d/idle.c (imap4d_idle): Catch eof * libmu_auth/tlsfdstr.c: Add missing include.
-rw-r--r--imap4d/idle.c7
-rw-r--r--libmu_auth/tlsfdstr.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/imap4d/idle.c b/imap4d/idle.c
index 69514004c..2cb2f03cb 100644
--- a/imap4d/idle.c
+++ b/imap4d/idle.c
@@ -69,7 +69,12 @@ imap4d_idle (struct imap4d_session *session,
mu_error (_("read error: %s"), mu_strerror (rc));
imap4d_bye (ERR_NO_IFILE);
}
-
+ else if (token_len == 0)
+ {
+ mu_error ("%s", _("eof while idling"));
+ imap4d_bye (ERR_NO_IFILE);
+ }
+
token_len = mu_rtrim_class (token_str, MU_CTYPE_ENDLN);
if (token_len == 4 && mu_c_strcasecmp (token_str, "done") == 0)
diff --git a/libmu_auth/tlsfdstr.c b/libmu_auth/tlsfdstr.c
index f9c0a19aa..3ad73533b 100644
--- a/libmu_auth/tlsfdstr.c
+++ b/libmu_auth/tlsfdstr.c
@@ -3,6 +3,7 @@
#endif
#include <stdlib.h>
#include <unistd.h>
+#include <limits.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/select.h>

Return to:

Send suggestions and report system problems to the System administrator.