Changeset 879bc4f6210eb02b1d036ea28ac0004a66b9c0c0

Show
Ignore:
Timestamp:
07/13/10 16:56:55 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1279040215 +0000
git-parent:

[ef7372e198ac162aed037e791cc84b39699683cb]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1279040215 +0000
Message:

fixes #297

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_filters.c

    r036ea66 r879bc4f  
    134134    /* Compile our rules */ 
    135135#define RULE_COMPILE(rname) do { \ 
    136   if(noit_conf_get_stringbuf(rules[j], "@" #rname, buffer, sizeof(buffer))) { \ 
     136  char *longre = NULL; \ 
     137  if(noit_conf_get_string(rules[j], "@" #rname, &longre)) { \ 
    137138    const char *error; \ 
    138139    int erroffset; \ 
    139     rule->rname = pcre_compile(buffer, 0, &error, &erroffset, NULL); \ 
     140    rule->rname = pcre_compile(longre, 0, &error, &erroffset, NULL); \ 
    140141    if(!rule->rname) { \ 
    141142      noitL(noit_error, "set '%s' rule '%s: %s' compile failed: %s\n", \ 
    142             set->name, #rname, buffer, error ? error : "???"); \ 
     143            set->name, #rname, longre, error ? error : "???"); \ 
    143144    } \ 
    144145    else { \ 
    145146      rule->rname##_e = pcre_study(rule->rname, 0, &error); \ 
    146147    } \ 
     148    free(longre); \ 
    147149  } \ 
    148150} while(0)