detect/bytemath: fix u32 buffer size logic

Remove u16 cast. Remove debug assert for u16 size.

In 83ed2c3b97 the input was changed to
u32
pull/10134/head
Victor Julien 2 years ago committed by Victor Julien
parent eca6639a82
commit 3e8db97687

@ -594,8 +594,7 @@ static int DetectEngineContentInspectionInternal(DetectEngineThreadCtx *det_ctx,
nbytes = bmd->nbytes;
}
DEBUG_VALIDATE_BUG_ON(buffer_len > UINT16_MAX);
if (DetectByteMathDoMatch(det_ctx, bmd, s, buffer, (uint16_t)buffer_len, nbytes, rvalue,
if (DetectByteMathDoMatch(det_ctx, bmd, s, buffer, buffer_len, nbytes, rvalue,
&det_ctx->byte_values[bmd->local_id], endian) != 1) {
goto no_match;
}

Loading…
Cancel
Save