From: Wayne Davison Date: Tue, 7 Mar 2006 08:46:29 +0000 (+0000) Subject: Make extra sure that authbuf can't overflow. X-Git-Tag: v2.6.7~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8030b28ff86550d486840266c21a483e46b96eb0;p=thirdparty%2Frsync.git Make extra sure that authbuf can't overflow. --- diff --git a/socket.c b/socket.c index c850cd36..8a960613 100644 --- a/socket.c +++ b/socket.c @@ -58,7 +58,7 @@ static int establish_proxy_connection(int fd, char *host, int port, proxy_user, ":", proxy_pass, NULL); len = strlen(buffer); - if ((len*8 + 5) / 6 >= (int)sizeof authbuf) { + if ((len*8 + 5) / 6 >= (int)sizeof authbuf - 3) { rprintf(FERROR, "authentication information is too long\n"); return -1;