From: okada Date: Thu, 2 Nov 2000 10:02:28 +0000 (+0000) Subject: 2000-10-07 Simon Josefsson X-Git-Tag: starttls-0_5~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22f7a6c7df95e4188c8076e417be9421c5661a34;p=elisp%2Fstarttls.git 2000-10-07 Simon Josefsson * starttls.c: Use `sizeof buffer -1' instead of `BUFSIZ/2'. --- diff --git a/ChangeLog b/ChangeLog index 44ad9e5..1b4611a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-10-07 Simon Josefsson + + * starttls.c: Use `sizeof buffer -1' instead of `BUFSIZ/2'. + 2000-10-07 Daiki Ueno * .cvsignore: Add `aclocal.m4', `install-sh', `mkinstalldirs', diff --git a/starttls.c b/starttls.c index 778ab48..db74ed2 100644 --- a/starttls.c +++ b/starttls.c @@ -310,7 +310,7 @@ main (argc, argv) } if (FD_ISSET (in, &readfds)) { - nbuffer = read (in, buffer, BUFSIZ/2); + nbuffer = read (in, buffer, sizeof buffer -1); if (nbuffer == 0) goto finish; @@ -332,9 +332,9 @@ main (argc, argv) 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)