patplex: Fixed regex compilation bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 11 Aug 2013 21:36:42 +0000 (23:36 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 11 Aug 2013 21:36:51 +0000 (23:36 +0200)
src/patplex.c

index 23fcf4e..692d480 100644 (file)
@@ -189,6 +189,7 @@ static struct pattern *parsepattern(struct cfstate *s)
                flog(LOG_WARNING, "%s:%i: missing pattern for `%s' match", s->file, s->lno, s->argv[0]);
                continue;
            }
+           rxfl = 0;
            if(s->argc >= 3) {
                if(strchr(s->argv[2], 'i'))
                    rxfl |= REG_ICASE;
@@ -216,6 +217,7 @@ static struct pattern *parsepattern(struct cfstate *s)
                flog(LOG_WARNING, "%s:%i: missing header name or pattern for `header' match", s->file, s->lno);
                continue;
            }
+           rxfl = 0;
            if(s->argc >= 4) {
                if(strchr(s->argv[3], 'i'))
                    rxfl |= REG_ICASE;