From: Victor Julien Date: Thu, 7 Dec 2023 16:07:04 +0000 (+0100) Subject: detect/bytemath: bump length to uint32_t X-Git-Tag: suricata-8.0.0-beta1~1914 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83ed2c3b97925d390c2a57fdc8eea52f7d3d2e4c;p=thirdparty%2Fsuricata.git detect/bytemath: bump length to uint32_t This puts the logic in line with the other payload inspection functions. --- diff --git a/src/detect-bytemath.c b/src/detect-bytemath.c index 3e848f21a5..8909085390 100644 --- a/src/detect-bytemath.c +++ b/src/detect-bytemath.c @@ -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) { diff --git a/src/detect-bytemath.h b/src/detect-bytemath.h index 4fbc9ae5ce..c18a3e82dc 100644 --- a/src/detect-bytemath.h +++ b/src/detect-bytemath.h @@ -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__ */