]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
hyperscan: don't abort on payloads > 64k
authorVictor Julien <victor@inliniac.net>
Wed, 25 Apr 2018 15:23:45 +0000 (17:23 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 16 Jul 2018 11:30:49 +0000 (13:30 +0200)
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

index b45dc8d936c3288ac19246bac1f72e5aa8d33e3e..747a5d423e1409dcaba34118a4a08db459cece67 100644 (file)
@@ -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);