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

Eion Robb <[email protected]> Tue, 19 Dec 2017 09:16:13 +1300
Newsgroups gmane.comp.gnome.gaim.devel
Message-ID <CAFt0mkpN1wAitZwWnJhu84LVYSRB9PSP4a1N6A_v8m+a4msC1A@mail.gmail.com>
Hi Thomas,

What's the eventloop implementation you're using?  The `return FALSE` from
the initate_resolving() function should prevent any future timers from
being triggered, so there shouldn't be any crash from setting an internal
value to 0

Cheers,
Eion

On 19 December 2017 at 02:59, Thomas Downing <[email protected]> wrote:

> 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.
> _______________________________________________
> Devel mailing list
> [email protected]
> https://pidgin.im/cgi-bin/mailman/listinfo/devel
>

_______________________________________________
Devel mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/devel