Skip to content

Commit

Permalink
eve/alert: fix validation check
Browse files Browse the repository at this point in the history
Bug: #6875.
(cherry picked from commit 0be3ba8)
  • Loading branch information
victorjulien authored and jlucovsky committed Sep 11, 2024
1 parent dcbef39 commit 6280cee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/output-json-alert.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,8 @@ static int AlertJson(ThreadVars *tv, JsonAlertLogThread *aft, const Packet *p)
int stream = (p->proto == IPPROTO_TCP) ?
(pa->flags & (PACKET_ALERT_FLAG_STATE_MATCH | PACKET_ALERT_FLAG_STREAM_MATCH) ?
1 : 0) : 0;
DEBUG_VALIDATE_BUG_ON(
p->flow == NULL); // should be impossible, but scan-build got confused
// should be impossible, as stream implies flow
DEBUG_VALIDATE_BUG_ON(stream && p->flow == NULL);

/* Is this a stream? If so, pack part of it into the payload field */
if (stream && p->flow != NULL) {
Expand Down

0 comments on commit 6280cee

Please # to comment.