diff options
author | Diogo Sousa <diogogsousa@gmail.com> | 2013-05-24 20:29:15 +0100 |
---|---|---|
committer | Diogo Sousa <diogogsousa@gmail.com> | 2013-05-24 20:29:15 +0100 |
commit | 133b0f7d9425219c291f58f12421ff1f2dbdfcbb (patch) | |
tree | 7204b02a12fda058a07cf9cbc1eb193de5f15181 /src/common/inbound.c | |
parent | 4878012065e03f9e3fe9d22a243fd430651c55d2 (diff) |
Fixed null pointer deref when we try to autojoin a channel of a network not
in the network list.
Diffstat (limited to 'src/common/inbound.c')
-rw-r--r-- | src/common/inbound.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c index da2cb34c..d0424296 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -1093,7 +1093,8 @@ check_autojoin_channels (server *serv) strcpy (sess->waitchannel, sess->willjoinchannel); sess->willjoinchannel[0] = 0; - fav = servlist_favchan_find (serv->network, sess->waitchannel, NULL); /* Is this channel in our favorites? */ + /* Is this channel in our favorites? */ + fav = serv->network == NULL ? NULL : servlist_favchan_find (serv->network, sess->waitchannel, NULL); /* session->channelkey is initially unset for channels joined from the favorites. You have to fill them up manually from favorites settings. */ if (fav) |