Changeset e437366 for protocols/oscar


Ignore:
Timestamp:
2010-07-16T23:55:53Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
177ffd7
Parents:
4346c3f4
Message:

Fix possible crash on trying to use half-created OSCAR chatrooms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    r4346c3f4 re437366  
    24312431        char *s;
    24322432       
    2433         ccon = c->data;
     2433        if (!(ccon = c->data))
     2434                return;
    24342435               
    24352436        for (s = message; *s; s++)
     
    24722473        struct im_connection *ic = c->ic;
    24732474        struct oscar_data * od = (struct oscar_data *)ic->proto_data;
    2474         struct chat_connection *ccon = c->data;
     2475        struct chat_connection *ccon;
     2476       
     2477        if (!(ccon = c->data))
     2478                return;
    24752479       
    24762480        aim_chat_invite(od->sess, od->conn, who, message ? message : "",
     
    24972501void oscar_chat_leave(struct groupchat *c)
    24982502{
     2503        if (!c->data)
     2504                return;
    24992505        oscar_chat_kill(c->ic, c->data);
    25002506}
     
    25282534        struct groupchat *ret;
    25292535        static int chat_id = 0;
    2530         char * chatname;
     2536        char * chatname, *s;
    25312537        struct groupchat *c;
    25322538       
    25332539        chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",
    25342540                                   ic->acc->user, chat_id++);
     2541       
     2542        for (s = chatname; *s; s ++)
     2543                if (!isalnum(*s))
     2544                        *s = '0';
    25352545       
    25362546        c = imcb_chat_new(ic, chatname);
Note: See TracChangeset for help on using the changeset viewer.