From 90e12ea2c85c9b3b43f82800873e329154527d1c Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 26 Sep 2019 19:06:30 -0600 Subject: * Return a read() to be a read of one byte. The current code has a code for a read of zero bytes, but this causes problems. Reported by Greg Oster. --- imap/src/osdep/unix/tcp_unix.c | 2 +- pith/pine.hlp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imap/src/osdep/unix/tcp_unix.c b/imap/src/osdep/unix/tcp_unix.c index 73791f6..c98b479 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,0)) < 0) && (errno == EINTR)); + while (((i = *ctr = read (sock,tmp,1)) < 0) && (errno == EINTR)); } if (i <= 0) { /* timeout or error? */ i = i ? errno : ETIMEDOUT;/* determine error code */ diff --git a/pith/pine.hlp b/pith/pine.hlp index fc603fc..d08242f 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 369 2019-09-22 10:20:26 +Alpine Commit 370 2019-09-26 19:06:25 ============= h_news ================= -- cgit v1.2.3-54-g00ecf