hyperscan: don't abort on payloads > 64k

SPM API was recently updated to accept 32 bit length fields instead of
16 bits. This could trigger a BUG_ON in the hyperscan implementation.
pull/3355/merge
Victor Julien 7 years ago
parent a5de9968dd
commit 8a5710307d

@ -161,7 +161,6 @@ static uint8_t *HSScan(const SpmCtx *ctx, SpmThreadCtx *thread_ctx,
}
BUG_ON(match_offset < sctx->needle_len);
BUG_ON(match_offset > UINT16_MAX); /* haystack_len is a uint16_t */
/* Note: existing API returns non-const ptr */
return (uint8_t *)haystack + (match_offset - sctx->needle_len);

Loading…
Cancel
Save