Mercurial > pidgin
diff src/proxy.c @ 10912:dcbc56eb3f37
[gaim-migrate @ 12667]
Fix bug 1200218 - crash when socks5 password is empty
committer: Tailor Script <tailor@pidgin.im>
| author | Stu Tomlinson <stu@nosnilmot.com> |
|---|---|
| date | Sat, 14 May 2005 13:20:37 +0000 |
| parents | 00483ba950bf |
| children | aca17634b9ab |
line wrap: on
line diff
--- a/src/proxy.c Fri May 13 01:04:08 2005 +0000 +++ b/src/proxy.c Sat May 14 13:20:37 2005 +0000 @@ -1576,9 +1576,13 @@ if (buf[1] == 0x02) { unsigned int i, j; + const char *u, *p; - i = strlen(gaim_proxy_info_get_username(phb->gpi)); - j = strlen(gaim_proxy_info_get_password(phb->gpi)); + u = gaim_proxy_info_get_username(phb->gpi); + p = gaim_proxy_info_get_password(phb->gpi); + + i = (u == NULL) ? 0 : strlen(u); + j = (p == NULL) ? 0 : strlen(p); buf[0] = 0x01; /* version 1 */ buf[1] = i;
