From: Alexander Butenko Date: Tue, 29 Nov 2011 00:32:31 +0000 (+0100) Subject: Do reset sig in adblock_is_matched_by_key X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de89a988f06eb7ff8fd7921a1253996db7b3244c;p=midori Do reset sig in adblock_is_matched_by_key --- 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); }