Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
23286:af23a35234b9 | 23287:eb27ae817284 |
---|---|
625 js->user = jabber_id_new(purple_account_get_username(account)); | 625 js->user = jabber_id_new(purple_account_get_username(account)); |
626 js->next_id = g_random_int(); | 626 js->next_id = g_random_int(); |
627 js->write_buffer = purple_circ_buffer_new(512); | 627 js->write_buffer = purple_circ_buffer_new(512); |
628 js->old_length = 0; | 628 js->old_length = 0; |
629 js->keepalive_timeout = -1; | 629 js->keepalive_timeout = -1; |
630 js->certificate_CN = g_strdup(connect_server[0] ? connect_server : js->user->domain); | 630 js->certificate_CN = g_strdup(connect_server[0] ? connect_server : js->user ? js->user->domain : NULL); |
631 | 631 |
632 if(!js->user) { | 632 if(!js->user) { |
633 purple_connection_error_reason (gc, | 633 purple_connection_error_reason (gc, |
634 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, | 634 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, |
635 _("Invalid XMPP ID")); | 635 _("Invalid XMPP ID")); |