detect/frames: fix too strict debug check

Frame::len is -1 if it is still unknown. Handle that in the debug
check.
pull/7787/head
Victor Julien 3 years ago committed by Shivani Bhardwaj
parent f04b7a1827
commit d31beba8d4

@ -89,7 +89,7 @@ static void PrefilterMpmFrame(DetectEngineThreadCtx *det_ctx, const void *pectx,
det_ctx, ctx->transforms, p, frames, frame, ctx->list_id, idx, true);
if (buffer == NULL)
return;
DEBUG_VALIDATE_BUG_ON(buffer->orig_len > frame->len);
DEBUG_VALIDATE_BUG_ON(frame->len >= 0 && buffer->orig_len > frame->len);
const uint32_t data_len = buffer->inspect_len;
const uint8_t *data = buffer->inspect;

Loading…
Cancel
Save