]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: fix fileext and filename negated match
authorMaurizio Abba <mabba@lastline.com>
Tue, 31 Jul 2018 06:08:10 +0000 (07:08 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 3 Aug 2018 14:11:04 +0000 (16:11 +0200)
commit8ec005afd6da5e88afdf7165647e1419abc08308
treeb58b4a37f82c4fc886ca59f81b18aeffe0f128a7
parent8771a02989e024cd5d8a80d51289c7ffef1ce17c
detect: fix fileext and filename negated match

fix bug in fileext and filename preventing negated match to work
correctly. Previously, negated fileext (such as !"php") would cause a
match anyway on files that have extension php, as the last if would not
be accessed.

Using the same workflow as detect-filemagic we remove the final
isolated if and set it as a branch of the previous if.
src/detect-fileext.c
src/detect-filename.c