Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 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 | ee884f1d7ae3 |
children | 69c049c48a96 |
line wrap: on
line diff
--- 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;