Skip to content

Commit

Permalink
app-layer/proto-detect: minor cleanup
Browse files Browse the repository at this point in the history
Make sure the mask calculation is u32.
  • Loading branch information
victorjulien committed Apr 6, 2020
1 parent aba4e19 commit ed8f48b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app-layer-detect-proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ed8f48b

Please sign in to comment.