From 1fb397be102cdfe6fa12fb363e689ce68595cad0 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 30 Oct 2005 13:52:58 +0000 Subject: Add array bounds check; fixes bug #320169. 2005-10-30 Christian Persch * src/bookmarks/ephy-nodes-cover.c: (ephy_nodes_get_covering): Add array bounds check; fixes bug #320169. --- src/bookmarks/ephy-nodes-cover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bookmarks') diff --git a/src/bookmarks/ephy-nodes-cover.c b/src/bookmarks/ephy-nodes-cover.c index dfe461ee3..92b2800f3 100644 --- a/src/bookmarks/ephy-nodes-cover.c +++ b/src/bookmarks/ephy-nodes-cover.c @@ -162,7 +162,7 @@ ephy_nodes_get_covering (const GPtrArray *parents, const GPtrArray *children, } /* While there are more suitable topics... */ - while (count_u[p]) + while (p < parents->len && count_u[p]) { /* Update the arrays of uncovered bookmarks and covering topics. */ parent = g_ptr_array_index (parents, p); -- cgit v1.2.3