diff libpurple/protocols/jabber/jabber.c @ 23287:eb27ae817284

Don't crash if the given jabber id is invalid. For example, bond/_007@gmail.com
author Mark Doliner <mark@kingant.net>
date Wed, 04 Jun 2008 23:05:31 +0000
parents e7b6767f263b
children e12600d6b902 c45d05bd58ed 26eabe8e739b 81ebe4fac9ce
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Wed Jun 04 22:50:40 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Wed Jun 04 23:05:31 2008 +0000
@@ -627,7 +627,7 @@
 	js->write_buffer = purple_circ_buffer_new(512);
 	js->old_length = 0;
 	js->keepalive_timeout = -1;
-	js->certificate_CN = g_strdup(connect_server[0] ? connect_server : js->user->domain);
+	js->certificate_CN = g_strdup(connect_server[0] ? connect_server : js->user ? js->user->domain : NULL);
 
 	if(!js->user) {
 		purple_connection_error_reason (gc,