Mercurial > pidgin.yaz
changeset 20866:af40f2766881
Prevent null ptr deref (CID 336).
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 10 Oct 2007 01:16:06 +0000 |
parents | e3d22d8ba9f0 |
children | faabcb979ac2 |
files | libpurple/protocols/yahoo/yahoo_aliases.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_aliases.c Wed Oct 10 01:14:34 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_aliases.c Wed Oct 10 01:16:06 2007 +0000 @@ -216,7 +216,7 @@ struct callback_data *cb; PurpleBuddy *buddy; PurpleUtilFetchUrlData *url_data; - + g_return_if_fail(alias!= NULL); g_return_if_fail(who!=NULL); g_return_if_fail(gc!=NULL); @@ -224,7 +224,7 @@ purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who); buddy = purple_find_buddy(gc->account, who); - if (buddy->proto_data == NULL) { + if (buddy == NULL || buddy->proto_data == NULL) { purple_debug_info("yahoo", "Missing proto_data (get_yahoo_aliases must have failed), bailing out\n"); return; }