Crash in dnsquery.c, branch 2.x.y

Thomas Downing tdowning at
Mon Dec 18 08:59:15 EST 2017

Hi all,

I am developing an application that uses libpurple.  During development,
I got a repeatable segfault during dns resolution.  I tracked the problem
to initiate_resolving() in dnsquery.c.  The current code fails to call
purple_timeout_remove().  When the timeout callback is later invoked by
my timer code, the gpointer data passed to me by purple_timeout_add()
is no longer valid, causing a segfault.

This is consistently repeatable, and is fixed by the attached patch.  The
patch just adds a call to purple_timeout_remove().

This patch is against branch 2.x.y.

Thomas Downing

Flon's Law:
    There is not now, and never will be, a language in
which it is the least bit difficult to write bad programs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnsquery.c.patch
Type: text/x-patch
Size: 321 bytes
Desc: not available
URL: <>

More information about the Devel mailing list