]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/bytemath: bump length to uint32_t
authorVictor Julien <vjulien@oisf.net>
Thu, 7 Dec 2023 16:07:04 +0000 (17:07 +0100)
committerVictor Julien <vjulien@oisf.net>
Thu, 14 Dec 2023 08:20:19 +0000 (09:20 +0100)
This puts the logic in line with the other payload inspection
functions.

src/detect-bytemath.c
src/detect-bytemath.h

index 3e848f21a5bb582b2b1218e448b450efd2550570..8909085390e47795d6c0588f1172226b50743335 100644 (file)
@@ -85,7 +85,7 @@ static inline bool DetectByteMathValidateNbytesOnly(const DetectByteMathData *da
 }
 
 int DetectByteMathDoMatch(DetectEngineThreadCtx *det_ctx, const DetectByteMathData *data,
-        const Signature *s, const uint8_t *payload, uint16_t payload_len, uint8_t nbytes,
+        const Signature *s, const uint8_t *payload, const uint32_t payload_len, uint8_t nbytes,
         uint64_t rvalue, uint64_t *value, uint8_t endian)
 {
     if (payload_len == 0) {
index 4fbc9ae5ce15cd5c70afd1316d553dd996c73122..c18a3e82dcab4039f0ae7813ba2d35142ab68880 100644 (file)
@@ -28,6 +28,6 @@ void DetectBytemathRegister(void);
 
 SigMatch *DetectByteMathRetrieveSMVar(const char *, const Signature *);
 int DetectByteMathDoMatch(DetectEngineThreadCtx *, const DetectByteMathData *, const Signature *,
-        const uint8_t *, uint16_t, uint8_t, uint64_t, uint64_t *, uint8_t);
+        const uint8_t *, const uint32_t, uint8_t, uint64_t, uint64_t *, uint8_t);
 
 #endif /* __DETECT_BYTEMATH_H__ */