From 33dc2618520409c0d52efff335fe299c26f6dd42 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 17 Apr 2007 19:49:49 -0700 Subject: Fixed NULL pointer dereference in Jabber code. --- protocols/jabber/presence.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 6bc8117f..f577e56a 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -73,7 +73,8 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ) /* FIXME: What to send if there are other resources??? */ imcb_buddy_status( ic, bud->bare_jid, OPT_LOGGED_IN | is_away, - bud->away_state->full_name, bud->away_message ); + ( is_away && bud->away_state ) ? bud->away_state->full_name : NULL, + bud->away_message ); } else if( strcmp( type, "unavailable" ) == 0 ) { -- cgit v1.2.3