From 8a5710307d3b2dd144ea7d1ba884441695721cf9 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 25 Apr 2018 17:23:45 +0200 Subject: [PATCH] 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. --- src/util-spm-hs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util-spm-hs.c b/src/util-spm-hs.c index b45dc8d936..747a5d423e 100644 --- a/src/util-spm-hs.c +++ b/src/util-spm-hs.c @@ -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);