From de89a988f06eb7ff8fd7921a1253996db7b3244c Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Tue, 29 Nov 2011 01:32:31 +0100 Subject: [PATCH] Do reset sig in adblock_is_matched_by_key --- extensions/adblock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/adblock.c b/extensions/adblock.c index 93e92bb9..21481e5c 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -650,6 +650,7 @@ adblock_is_matched_by_key (const gchar* req_uri, gboolean ret = FALSE; gchar sig[SIGNATURE_SIZE + 1]; + memset (&sig[0], 0, sizeof (sig)); /* Signatures are made on pattern, so we need to convert url to a pattern as well */ guri = adblock_fixup_regexp ("", (gchar*)req_uri); uri = guri->str; @@ -665,7 +666,7 @@ adblock_is_matched_by_key (const gchar* req_uri, if (!regex || g_list_find (regex_bl, regex)) continue; ret = adblock_check_rule (regex, sig, req_uri, page_uri); - if (!ret) + if (ret) break; regex_bl = g_list_prepend (regex_bl, regex); } -- 2.39.5