Do reset sig in adblock_is_matched_by_key

This commit is contained in:
Alexander Butenko 2011-11-29 01:32:31 +01:00 committed by Christian Dywan
parent 0e93695979
commit de89a988f0

View file

@ -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);
}