Commit 8030b28f authored by Wayne Davison's avatar Wayne Davison

Make extra sure that authbuf can't overflow.

parent 1c598b1d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment