]> spindle.queued.net Git - midori/commitdiff
Use g_strndup as opposed to strndup in Adblock
authorEnrico Tröger <enrico.troeger@uvena.de>
Mon, 28 Dec 2009 22:57:47 +0000 (23:57 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 28 Dec 2009 22:59:54 +0000 (23:59 +0100)
extensions/adblock.c

index cb5162d19ef7dd8eb43124732793cf5bdd22f0b1..6cb2be3756a6a9b8fe6f7623e6814155bc3ddd28 100644 (file)
@@ -833,7 +833,7 @@ adblock_compile_regexp (GHashTable* tbl,
     {
         int len = strlen (patt);
         for (pos = len - SIGNATURE_SIZE; pos >= 0; pos--) {
-            sig = strndup(patt+pos, SIGNATURE_SIZE);
+            sig = g_strndup (patt + pos, SIGNATURE_SIZE);
             if (!g_regex_match_simple ("[\\*]", sig, G_REGEX_UNGREEDY, G_REGEX_MATCH_NOTEMPTY) &&
                 !g_hash_table_lookup (keystbl, sig))
             {