Use g_strndup as opposed to strndup in Adblock
This commit is contained in:
parent
62906f9347
commit
d0a52ac09c
1 changed files with 1 additions and 1 deletions
|
@ -833,7 +833,7 @@ adblock_compile_regexp (GHashTable* tbl,
|
||||||
{
|
{
|
||||||
int len = strlen (patt);
|
int len = strlen (patt);
|
||||||
for (pos = len - SIGNATURE_SIZE; pos >= 0; pos--) {
|
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) &&
|
if (!g_regex_match_simple ("[\\*]", sig, G_REGEX_UNGREEDY, G_REGEX_MATCH_NOTEMPTY) &&
|
||||||
!g_hash_table_lookup (keystbl, sig))
|
!g_hash_table_lookup (keystbl, sig))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue