src/proxy.c

changeset 10912
ec7c127a435b
parent 10711
f6279a730e85
child 10917
f32ea2da503b
--- 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;

mercurial