]> git.ipfire.org Git - thirdparty/suricata.git/commit
file-hash-common: fix rule_file truncation
authorJason Ish <jason.ish@oisf.net>
Fri, 26 Jun 2020 17:45:38 +0000 (11:45 -0600)
committerVictor Julien <victor@inliniac.net>
Sun, 28 Jun 2020 12:20:59 +0000 (14:20 +0200)
commitb8d1677b9ce25a2fe2e1d275518613f9c7a45548
tree4763ea4fa29ffd314cae3c770f5ef23cbb00b60c
parent648bd5afff68dfab8d2d495aa9ab94ef572f7191
file-hash-common: fix rule_file truncation

Loading file hash lists uses dirname(3) on the
de_ctx->rule_file which modifies the contents,
removing the last part of the path. So on subsequent
calls the rule_file no longer contains the rule_file,
but instead just the directory name.

Mostly noticed when using "-S" with rule files outside
of the default-rule-path which requires more hunting for
the rule file.
src/detect-file-hash-common.c