From ed8f48b05374a3335bc15969f2dde82540d18607 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 6 Apr 2020 19:35:24 +0200 Subject: [PATCH] app-layer/proto-detect: minor cleanup Make sure the mask calculation is u32. --- src/app-layer-detect-proto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index a9c0ce2831..1c1509ea9d 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -645,12 +645,10 @@ static uint32_t AppLayerProtoDetectProbingParserGetMask(AppProto alproto) SCEnter(); if (!(alproto > ALPROTO_UNKNOWN && alproto < ALPROTO_FAILED)) { - SCLogError(SC_ERR_ALPARSER, "Unknown protocol detected - %"PRIu16, - alproto); - exit(EXIT_FAILURE); + FatalError(SC_ERR_ALPARSER, "Unknown protocol detected - %u", alproto); } - SCReturnUInt(1 << alproto); + SCReturnUInt(1UL << (uint32_t)alproto); } static AppLayerProtoDetectProbingParserElement *AppLayerProtoDetectProbingParserElementAlloc(void) -- 2.47.2