X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=cproxy.c;h=4f9a3ffa591c8b00833d0f6b24c69f83ca64ec06;hb=510f49e405e71ba5c97875e7a019364e1ef5fac9;hp=5f2f15fc73ca687b5f65f92476a1a6b0f60c72b3;hpb=9e20c81bc9c945565dd182854eeffa03b63f830a;p=PuTTY.git diff --git a/cproxy.c b/cproxy.c index 5f2f15fc..4f9a3ffa 100644 --- a/cproxy.c +++ b/cproxy.c @@ -173,7 +173,8 @@ int proxy_socks5_selectchap(Proxy_Socket p) chapbuf[5] = '\x02'; /* Second attribute - username */ ulen = strlen(username); - if (ulen > 255) ulen = 255; if (ulen < 1) ulen = 1; + if (ulen > 255) ulen = 255; + if (ulen < 1) ulen = 1; chapbuf[6] = ulen; memcpy(chapbuf+7, username, ulen);