From ba3a2c31bf0544e531789d88b19cefd8f5c75dd9 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 27 Nov 2019 12:47:01 -0600 Subject: [PATCH] app-layer: validate TX detect flag callbacks Check that both are set or unset. --- src/app-layer-parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 4e526d493f1d..03f23dd1c7cb 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -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: