[Pidgin] #7603: Crash in purple_accounts_delete

Pidgin trac at pidgin.im
Fri Nov 21 19:11:38 EST 2008


#7603: Crash in purple_accounts_delete
-------------------+--------------------------------------------------------
Reporter:  fqueze  |        Type:  patch    
  Status:  new     |   Component:  libpurple
 Version:  2.5.2   |    Keywords:           
-------------------+--------------------------------------------------------
 Attempting to delete an account before the buddy list is initialized
 crashes libpurple.
 I noticed this because in Instantbird I load the list of accounts first,
 and then initialize and load the buddy list.
 When an account fails to initialize properly, I delete it and this crashed
 on this line:

 libpurple/account.c:2503: for (gnode = purple_get_blist()->root; ...

 A purple_blist_get_root function that checks that the buddy list is not
 null exists, I think it should be used here.
 The attached patch fixes the crash that I encountered by using this
 function.

 I think the purple_get_blist()->root pattern is dangerous anyway, so I'm
 attaching another patch that removes it from the whole tree. I think it
 would be safer to apply this patch, even if I haven't identified any
 specific case that crashes because of this.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7603>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list