]> 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:15:34 +0000 (16:15 +0200)
commitf32cc6ca9c11c09d4e84a5a9a37d3bca4abfaed1
tree4fd7b360a5a745b74a2daac61f1dbde51bf68877
parent9370805af630f5be415b84813b902072d6deab17
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