From: Victor Julien Date: Sun, 7 Jun 2020 19:13:32 +0000 (+0200) Subject: app-layer: GetTxData callback is mandatory X-Git-Tag: suricata-6.0.0-beta1~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f88657206c23b2a6d474c37f87c1dfecf9ed33aa;p=thirdparty%2Fsuricata.git app-layer: GetTxData callback is mandatory --- diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index bb3c3872fd..6de88860f5 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -1460,6 +1460,7 @@ static void ValidateParserProtoDump(AppProto alproto, uint8_t ipproto) printf("- StateAlloc %p StateFree %p\n", ctx->StateAlloc, ctx->StateFree); printf("- StateGetTx %p StateGetTxCnt %p StateTransactionFree %p\n", ctx->StateGetTx, ctx->StateGetTxCnt, ctx->StateTransactionFree); + printf("- GetTxData %p\n", ctx->GetTxData); printf("- StateGetProgress %p StateGetProgressCompletionStatus %p\n", ctx->StateGetProgress, ctx_def->StateGetProgressCompletionStatus); printf("- GetTxDetectState %p SetTxDetectState %p\n", ctx->GetTxDetectState, ctx->SetTxDetectState); printf("Optional:\n"); @@ -1505,7 +1506,9 @@ static void ValidateParserProto(AppProto alproto, uint8_t ipproto) if (!(BOTH_SET_OR_BOTH_UNSET(ctx->GetTxDetectState, ctx->SetTxDetectState))) { goto bad; } - + if (ctx->GetTxData == NULL) { + goto bad; + } return; bad: ValidateParserProtoDump(alproto, ipproto);