X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=cproxy.c;fp=cproxy.c;h=4f9a3ffa591c8b00833d0f6b24c69f83ca64ec06;hb=d700c33422926dda1b4af90bf1fcd262b03cfca8;hp=5f2f15fc73ca687b5f65f92476a1a6b0f60c72b3;hpb=9351a5bfe4b1630227581d77f1aff4ca729ab8c1;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);