summaryrefslogtreecommitdiff
path: root/imap/src
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src')
-rw-r--r--imap/src/c-client/smtp.c7
-rw-r--r--imap/src/osdep/unix/tcp_unix.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/imap/src/c-client/smtp.c b/imap/src/c-client/smtp.c
index 1c72670c..1a79d28d 100644
--- a/imap/src/c-client/smtp.c
+++ b/imap/src/c-client/smtp.c
@@ -1,4 +1,5 @@
/* ========================================================================
+ * Copyright 2015 Eduardo Chappa
* Copyright 2008 Mark Crispin
* ========================================================================
*/
@@ -9,7 +10,8 @@
* Author: Mark Crispin
*
* Date: 27 July 1988
- * Last Edited: 19 November 2008
+ * Last Edited: 19 November 2008 (Crispin)
+ * Last Edited: 16 January 2015 (Chappa)
*
* Previous versions of this file were
*
@@ -345,8 +347,9 @@ void *smtp_challenge (void *s,unsigned long *len)
if ((stream->replycode == SMTPAUTHREADY) &&
!(ret = rfc822_base64 ((unsigned char *) stream->reply + 4,
strlen (stream->reply + 4),len))) {
- sprintf (tmp,"SMTP SERVER BUG (invalid challenge): %.80s",stream->reply+4);
+ sprintf (tmp,"SMTP SERVER BUG (invalid challenge, continuing): %.80s",stream->reply+4);
mm_log (tmp,ERROR);
+ ret = cpystr(""); /* This is silly: fake a reply, it will be ignored */
}
return ret;
}
diff --git a/imap/src/osdep/unix/tcp_unix.c b/imap/src/osdep/unix/tcp_unix.c
index 652f1250..4fe8194d 100644
--- a/imap/src/osdep/unix/tcp_unix.c
+++ b/imap/src/osdep/unix/tcp_unix.c
@@ -312,7 +312,7 @@ int tcp_socket_open (int family,void *adr,size_t adrlen,unsigned short port,
/* This used to be a zero-byte read(), but that crashes Solaris */
/* get socket status */
if(FD_ISSET(sock,&rfds))
- while (((i = *ctr = read (sock,tmp,1)) < 0) && (errno == EINTR));
+ while (((i = *ctr = read (sock,tmp,0)) < 0) && (errno == EINTR));
}
if (i <= 0) { /* timeout or error? */
i = i ? errno : ETIMEDOUT;/* determine error code */