Skip to content

Commit

Permalink
app-layer: validate TX detect flag callbacks
Browse files Browse the repository at this point in the history
Check that both are set or unset.
  • Loading branch information
jasonish committed Nov 27, 2019
1 parent 706558d commit ba3a2c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app-layer-parser.c
Expand Up @@ -1497,6 +1497,9 @@ static void ValidateParserProto(AppProto alproto, uint8_t ipproto)
if (!(BOTH_SET_OR_BOTH_UNSET(ctx->GetTxDetectState, ctx->SetTxDetectState))) {
goto bad;
}
if (!(BOTH_SET_OR_BOTH_UNSET(ctx->GetTxDetectFlags, ctx->SetTxDetectFlags))) {
goto bad;
}

return;
bad:
Expand Down

0 comments on commit ba3a2c3

Please sign in to comment.