From 8030b28ff86550d486840266c21a483e46b96eb0 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 7 Mar 2006 08:46:29 +0000 Subject: [PATCH] Make extra sure that authbuf can't overflow. --- socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1