Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188018 - net-im/pidgin-2.1.0 segfaults when email notification is enabled
Summary: net-im/pidgin-2.1.0 segfaults when email notification is enabled
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Net-im project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-07 14:57 UTC by Dmitry Karasik
Modified: 2007-08-21 04:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The gdb backtrace. (gdb.trace,1.64 KB, text/plain)
2007-08-07 15:01 UTC, Dmitry Karasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Karasik 2007-08-07 14:57:50 UTC
1. Enable new mail notification for XMPP (gmail).
2. Have some new mail.
3. Login using pidgin.

I get a SIGSEGV.

What happens in google.c at line 123 we free the subjects, however i is the number of subjects, so subjects[i] is uninitialized the 1st time through the loop and we free an uninitialized pointer.

Also, the way that subjects[i] is assigned to on line 104 is bogus. It allocates a new empty string in case of null, or assigns directly the pointer from the XML structure otherwise.

This means that if subject wasn't null, we will free an internal pointer from within the XML structure which xmlnode_free() will attempt to free later as well.
Comment 1 Dmitry Karasik 2007-08-07 15:01:25 UTC
Created attachment 127176 [details]
The gdb backtrace.

Note that returned_count == 11 and i == 11, so when we try to free we are first dereferencing a pointer to memory we didn't allocate, and then freeing something that wasn't even initialized.
Comment 2 Hong Hao 2007-08-09 15:15:11 UTC
This problem also happens to me.
Comment 3 Elliott Sales de Andrade 2007-08-21 04:34:21 UTC
This crash is known upstream¹ and should be fixed in 2.1.1.

As for your second point about line 104, xmlnode_get_data returns a copy of data, not an internal pointer, and it must be g_free'd later. There's nothing wrong there.

¹ http://developer.pidgin.im/ticket/2323
Comment 4 Olivier Crete (RETIRED) gentoo-dev 2007-08-21 04:43:27 UTC
lets mark it upstream then