From: Jeff Lucovsky Date: Sun, 17 May 2020 13:51:40 +0000 (-0400) Subject: detect: Increase flag size for byte_jump X-Git-Tag: suricata-6.0.0-beta1~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=620659b5f33671cafe4bac3250e1e9b818ec9dc8;p=thirdparty%2Fsuricata.git detect: Increase flag size for byte_jump --- diff --git a/src/detect-bytejump.c b/src/detect-bytejump.c index ab8004a976..5d26af21f8 100644 --- a/src/detect-bytejump.c +++ b/src/detect-bytejump.c @@ -90,7 +90,7 @@ void DetectBytejumpRegister (void) */ int DetectBytejumpDoMatch(DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchCtx *ctx, const uint8_t *payload, uint32_t payload_len, - uint8_t flags, int32_t offset) + uint16_t flags, int32_t offset) { SCEnter(); diff --git a/src/detect-bytejump.h b/src/detect-bytejump.h index eccd2f6af1..65b11b3338 100644 --- a/src/detect-bytejump.h +++ b/src/detect-bytejump.h @@ -77,7 +77,7 @@ void DetectBytejumpRegister (void); * error as a match. */ int DetectBytejumpDoMatch(DetectEngineThreadCtx *, const Signature *, const SigMatchCtx *, - const uint8_t *, uint32_t, uint8_t, int32_t); + const uint8_t *, uint32_t, uint16_t, int32_t); #endif /* __DETECT_BYTEJUMP_H__ */ diff --git a/src/detect-engine-content-inspection.c b/src/detect-engine-content-inspection.c index 61ed9f52b0..754dcb0a69 100644 --- a/src/detect-engine-content-inspection.c +++ b/src/detect-engine-content-inspection.c @@ -486,7 +486,7 @@ int DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx } else if (smd->type == DETECT_BYTEJUMP) { DetectBytejumpData *bjd = (DetectBytejumpData *)smd->ctx; - uint8_t bjflags = bjd->flags; + uint16_t bjflags = bjd->flags; int32_t offset = bjd->offset; if (bjflags & DETECT_BYTEJUMP_OFFSET_BE) {