From 620659b5f33671cafe4bac3250e1e9b818ec9dc8 Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Sun, 17 May 2020 09:51:40 -0400 Subject: [PATCH] detect: Increase flag size for byte_jump --- src/detect-bytejump.c | 2 +- src/detect-bytejump.h | 2 +- src/detect-engine-content-inspection.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.47.2