[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-devel] PAN 0.93:walk_and_add in header-pane.cc has too deep recursi
From: |
Sinan Karasu |
Subject: |
[Pan-devel] PAN 0.93:walk_and_add in header-pane.cc has too deep recursion |
Date: |
Wed, 19 Apr 2006 19:38:58 -0700 |
User-agent: |
KMail/1.9.1 |
header-pane.cc
has the following recursive algorithm, which crashes if header pane has more
than about 40,000 entries.
void
walk_and_add (const Data & data,
GtkTreeModel * model,
GtkTreeIter * parent,
GtkTreeIter * cur,
const parent_to_children_t & mids_with_new_children,
const Data::ArticleTree * atree)
{
const Article *a (get_rec (model, cur).article);
parent_to_children_t::const_iterator i (mids_with_new_children.find
(a->message_id));
if (i != mids_with_new_children.end())
foreach_const (quarks_t, i->second, it)
add_article_to_model (data, GTK_TREE_STORE(model), cur,
atree->get_article(*it));
GtkTreeIter child;
if (gtk_tree_model_iter_children (model, &child, cur))
walk_and_add (data, model, cur, &child, mids_with_new_children, atree);
if (gtk_tree_model_iter_next (model, cur))
walk_and_add (data, model, parent, cur, mids_with_new_children, atree);
}
}
- [Pan-devel] PAN 0.93:walk_and_add in header-pane.cc has too deep recursion,
Sinan Karasu <=