[Xfce4-commits] <midori:master> Use the correct counter when storing adblock filters
Christian Dywan
noreply at xfce.org
Wed Oct 14 03:38:01 CEST 2009
Updating branch refs/heads/master
to fa030cbaca7dc8a0a891cd1be7578652d20fbf45 (commit)
from 5f30199df58ccd9e0944c4d32bfb78a78ebcaf27 (commit)
commit fa030cbaca7dc8a0a891cd1be7578652d20fbf45
Author: Christian Dywan <christian at twotoasts.de>
Date: Wed Oct 14 03:17:23 2009 +0200
Use the correct counter when storing adblock filters
This crash was tricky since 'length' looked correct while in fact
it is the number of items including invalid items, which can be
more than we store.
extensions/adblock.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/extensions/adblock.c b/extensions/adblock.c
index 5ffc3c5..9cf7931 100644
--- a/extensions/adblock.c
+++ b/extensions/adblock.c
@@ -172,8 +172,8 @@ adblock_preferences_model_row_changed_cb (GtkTreeModel* model,
g_free (filter);
}
while (gtk_tree_model_iter_next (model, iter));
- filters[length] = NULL;
- midori_extension_set_string_list (extension, "filters", filters, length);
+ filters[i] = NULL;
+ midori_extension_set_string_list (extension, "filters", filters, i);
g_free (filters);
if (need_reload)
adblock_reload_rules (extension);
More information about the Xfce4-commits
mailing list