[Xfce4-commits] <midori:master> Use g_strndup as opposed to strndup in Adblock

Christian Dywan noreply at xfce.org
Tue Dec 29 00:00:03 CET 2009


Updating branch refs/heads/master
         to d0a52ac09cca5a59115286cd120e75433f3f98cc (commit)
       from 62906f934798f996886bdb6a0d21a20bae8569a0 (commit)

commit d0a52ac09cca5a59115286cd120e75433f3f98cc
Author: Enrico Tröger <enrico.troeger at uvena.de>
Date:   Mon Dec 28 23:57:47 2009 +0100

    Use g_strndup as opposed to strndup in Adblock

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

diff --git a/extensions/adblock.c b/extensions/adblock.c
index cb5162d..6cb2be3 100644
--- a/extensions/adblock.c
+++ b/extensions/adblock.c
@@ -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))
             {



More information about the Xfce4-commits mailing list