summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-09-26 19:06:30 -0600
committerEduardo Chappa <chappa@washington.edu>2019-09-26 19:06:30 -0600
commit90e12ea2c85c9b3b43f82800873e329154527d1c (patch)
tree86abcb0b0d2bd9fe7b17835a55f28de14afeb94e
parentb9de8dcc0aff082f61a638c9f0dd12b285cd6533 (diff)
downloadalpine-90e12ea2c85c9b3b43f82800873e329154527d1c.tar.xz
* 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.
-rw-r--r--imap/src/osdep/unix/tcp_unix.c2
-rw-r--r--pith/pine.hlp2
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 =================
<HTML>
<HEAD>