From 854d0bbcc00ea74ce37e431a2c3398d9a02f42c5 Mon Sep 17 00:00:00 2001 From: Binghui Niu Date: Tue, 25 Mar 2025 14:35:48 +0800 Subject: [PATCH] applayer: fix alp_ctx indexing in tests Fix problem that some app-layer unittests regist failed. --- src/app-layer-parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 47012a7db0..cc7eb38394 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -1813,8 +1813,7 @@ void AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto, void (*RegisterUnittests)(void)) { SCEnter(); - alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. - RegisterUnittests = RegisterUnittests; + alp_ctx.ctxs[alproto][FlowGetProtoMapping(ipproto)].RegisterUnittests = RegisterUnittests; SCReturn; }