diff options
-rw-r--r-- | NEWS | 12 | ||||
-rw-r--r-- | driver.c | 4 | ||||
-rw-r--r-- | socket.c | 3 |
3 files changed, 16 insertions, 3 deletions
@@ -1,6 +1,18 @@ Release Notes: ------------------------------------------------------------------------------ +fetchmail-3.7 () + +features -- + +* Treat unexpected EOF as a protocol error. + +bugs -- + +* Fix password-shrouding logic so it doesn't crap out on a zero-length + password. + +------------------------------------------------------------------------------ fetchmail-3.6 (Mon Feb 17 00:19:55 EST 1997) features -- @@ -1512,7 +1512,7 @@ va_dcl { char *cp; - if (shroud && (cp = strstr(buf, shroud))) + if (shroud && shroud[0] && (cp = strstr(buf, shroud))) { char *sp; @@ -1582,7 +1582,7 @@ va_dcl { char *cp; - if (shroud && (cp = strstr(buf, shroud))) + if (shroud && shroud[0] && (cp = strstr(buf, shroud))) { char *sp; @@ -118,7 +118,8 @@ char *SockGets(char *buf, int len, FILE *sockfp) if (--len < 1) return NULL; do { - if ((n = recv(fileno(sockfp), bp, len, MSG_PEEK)) == -1) + /* return value of 0 is EOF, < 0 is error */ + if ((n = recv(fileno(sockfp), bp, len, MSG_PEEK)) <= 0) return NULL; if ((p = memchr(bp, '\n', n)) != NULL) { |