Re: fix for a crash in connector [exchange]

pchenthill <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Hi harish,

On Wed, 2006-02-22 at 13:30 +0530, Harish Krishnaswamy wrote:

> 754: folder = subtrees->data; 
>          <== it is reassigned here before being used again. 
> 

If you see 

		if (hwd->priv->deep_searchable &&
		    e_folder_exchange_get_has_subfolders (folder)) {
			e_folder_exchange_set_has_subfolders (folder, FALSE);
729:			subtrees = g_slist_prepend (subtrees, folder); <<<<<<<< Added to
the subtrees GList
		}
731:		exchange_hierarchy_new_folder (hier, folder);
732:		g_object_unref (folder);
Here its freed.

Then later ,
	while (subtrees) {
		folder = subtrees->data;  <<<<< accessing the same GList from line
no : 729
		subtrees = g_slist_remove (subtrees, folder);
		/* Dont scan the subtree for deleteditems folder */
757:		int_uri = e_folder_exchange_get_internal_uri (folder); << folder
is invalid memory (already freed at line no: 732) 

We are trying to access a freed memory location which causes the crash.

thanks, Chenthill.

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.