]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: Increase flag size for byte_jump
authorJeff Lucovsky <jeff@lucovsky.org>
Sun, 17 May 2020 13:51:40 +0000 (09:51 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Jul 2020 08:49:45 +0000 (10:49 +0200)
src/detect-bytejump.c
src/detect-bytejump.h
src/detect-engine-content-inspection.c

index ab8004a976f34ffde987c35b0888f54f23d35b39..5d26af21f8f0f62c833d35ba35469d84c16fde64 100644 (file)
@@ -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();
 
index eccd2f6af154de92e169929566577c09f10d98f6..65b11b33389d3837e0f1c4c3d9a8bb322d5b9baa 100644 (file)
@@ -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__ */
 
index 61ed9f52b00d88df8161139419863fe4581e9505..754dcb0a6937ac9ac9931a262a54c9de98c89068 100644 (file)
@@ -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) {