[Xfce4-commits] <midori:master> Do reset sig in adblock_is_matched_by_key

Christian Dywan noreply at xfce.org
Tue Nov 29 01:36:01 CET 2011


Updating branch refs/heads/master
         to de89a988f06eb7ff8fd7921a1253996db7b3244c (commit)
       from 0e93695979d1252985768851aa8c54ad7442d253 (commit)

commit de89a988f06eb7ff8fd7921a1253996db7b3244c
Author: Alexander Butenko <a.butenka at gmail.com>
Date:   Tue Nov 29 01:32:31 2011 +0100

    Do reset sig in adblock_is_matched_by_key

 extensions/adblock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/extensions/adblock.c b/extensions/adblock.c
index 93e92bb..21481e5 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);
     }


More information about the Xfce4-commits mailing list