+2000-10-07 Simon Josefsson <sj@extundo.com>
+
+ * starttls.c: Use `sizeof buffer -1' instead of `BUFSIZ/2'.
+
2000-10-07 Daiki Ueno <ueno@unixuser.org>
* .cvsignore: Add `aclocal.m4', `install-sh', `mkinstalldirs',
}
if (FD_ISSET (in, &readfds))
{
- nbuffer = read (in, buffer, BUFSIZ/2);
+ nbuffer = read (in, buffer, sizeof buffer -1);
if (nbuffer == 0)
goto finish;
if (FD_ISSET (tls_fd, &readfds))
{
if (tls_conn)
- nbuffer = SSL_read (tls_conn, buffer, BUFSIZ/8);
+ nbuffer = SSL_read (tls_conn, buffer, sizeof buffer -1);
else
- nbuffer = read (tls_fd, buffer, BUFSIZ/2);
+ nbuffer = read (tls_fd, buffer, sizeof buffer -1);
if (nbuffer == 0)
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)