Allow analyzer violations to explicitly set tag.

We could already pass an overriding tag to
`Analyzer::AnalyzerConfirmation()`, but we didn't have that ability
for `AnalyzerViolation`, leading to the two potentially mismatching in
the analyzer they report.
This commit is contained in:
Robin Sommer 2022-04-12 09:34:05 +02:00
parent d29160e9de
commit d2e8c5e887
No known key found for this signature in database
GPG key ID: 6BEDA4DA6B8B23E3
6 changed files with 16 additions and 9 deletions

View file

@ -68,7 +68,8 @@ public:
// This suppresses violations if the TCP connection wasn't
// fully established.
void AnalyzerViolation(const char* reason, const char* data = nullptr, int len = 0) override;
void AnalyzerViolation(const char* reason, const char* data = nullptr, int len = 0,
zeek::Tag tag = zeek::Tag()) override;
// "name" and "val" both now belong to this object, which needs to
// delete them when done with them.