Mercurial > pidgin.yaz
changeset 4120:697217b52ebd
[gaim-migrate @ 4337]
stop kicking me in the balls
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Mon, 23 Dec 2002 20:29:00 +0000 |
parents | a6825994ab3a |
children | 69c049c48a96 |
files | ChangeLog src/protocols/oscar/oscar.c |
diffstat | 2 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Dec 23 18:27:27 2002 +0000 +++ b/ChangeLog Mon Dec 23 20:29:00 2002 +0000 @@ -104,6 +104,8 @@ window (Thanks, Christian Hammond) * Ability to add screenname@mac.com people to AIM buddy lists (Thanks, Graham Booker) + * Fixed crashbug on empty rvous requests, thanks Brandon Scott (Xeon) for + being the first to point this out version 0.59 (06/24/2002): * Hungarian translation added (Thanks, Sutto Zoltan)
--- a/src/protocols/oscar/oscar.c Mon Dec 23 18:27:27 2002 +0000 +++ b/src/protocols/oscar/oscar.c Mon Dec 23 20:29:00 2002 +0000 @@ -222,7 +222,12 @@ static char *extract_name(const char *name) { char *tmp; int i, j; - char *x = strchr(name, '-'); + char *x; + + if (!name) + return NULL; + + x = strchr(name, '-'); if (!x) return NULL; x = strchr(++x, '-'); if (!x) return NULL; @@ -1877,7 +1882,15 @@ if (args->reqclass & AIM_CAPS_CHAT) { char *name = extract_name(args->info.chat.roominfo.name); - int *exch = g_new0(int, 1); + int *exch; + + if (!name) { + /* Well, something weird must've happened here, let's run to church */ + debug_printf("somebody tried to kick you in the balls.\n"); + return 0; + } + + exch = g_new0(int, 1); GList *m = NULL; m = g_list_append(m, g_strdup(name ? name : args->info.chat.roominfo.name)); *exch = args->info.chat.roominfo.exchange;