[Pidgin] #7920: Bonjour on Win32 Crash

Pidgin trac at pidgin.im
Sat Dec 27 17:23:05 EST 2008


#7920: Bonjour on Win32 Crash
---------------------------+------------------------------------------------
 Reporter:  BigBrownChunx  |        Owner:  datallah
     Type:  patch          |       Status:  new     
Milestone:                 |    Component:  Bonjour 
  Version:  2.5.3          |   Resolution:          
 Keywords:  bonjour crash  |  
---------------------------+------------------------------------------------
Description changed by BigBrownChunx:

Old description:

> I am often experiencing crashes in _mdns_resolve_host_callback() in
> mdns_win32.c when buddies go offline.  This is due to the lack of error
> checking in the callback.
>
> args->bb->name can be NULL when buddies go offline (beats me why), and
> this causes crashes in the debug printout, since win32 glib can't handle
> printing NULL strings without segfaulting.
>
> I'm not sure if this is the best way to handle it, or if its part of a
> larger problem but a partial solution for me has been to add
>
> g_return_if_fail(args->bb->name != NULL);
> to line 172 of mdns_win32.c
>
> There is still some problems with free'd memory being passed to the
> callback, but this needs further investigation.

New description:

 I am often experiencing crashes in _mdns_resolve_host_callback() in
 mdns_win32.c when buddies go offline.  This is due to the lack of error
 checking in the callback.

 args->bb->name can be NULL when buddies go offline (beats me why), and
 this causes crashes in the debug printout, since win32 glib can't handle
 printing NULL strings without segfaulting.

 I'm not sure if this is the best way to handle it, or if its part of a
 larger problem but a partial solution for me has been to add

 g_return_if_fail(args->bb->name != NULL);

 to line 172 of mdns_win32.c

 There is still some problems with free'd memory being passed to the
 callback, but this needs further investigation.

--

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7920#comment:1>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list