]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: validate TX detect flag callbacks 4405/head
authorJason Ish <jason.ish@oisf.net>
Wed, 27 Nov 2019 18:47:01 +0000 (12:47 -0600)
committerJason Ish <jason.ish@oisf.net>
Wed, 27 Nov 2019 19:42:53 +0000 (13:42 -0600)
Check that both are set or unset.

src/app-layer-parser.c

index 4e526d493f1d31cc361c88636f725ac6c77192e3..03f23dd1c7cba991d9a9e8d14e27c8e4ccc24d2e 100644 (file)
@@ -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: