]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: fix -Wshorten-64-to-32 warnings for content inspection 13223/head
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 12 May 2025 19:50:04 +0000 (21:50 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 13 May 2025 07:29:29 +0000 (09:29 +0200)
Ticket: 6186

src/detect-engine-content-inspection.c
src/detect-engine-content-inspection.h

index 7ee7c19d4873ab85d4366799baab7eff324a0896..c15aeb1f5dc914ac979951e6644d20a8f551ad33 100644 (file)
@@ -107,7 +107,7 @@ struct DetectEngineContentInspectionCtx {
 static int DetectEngineContentInspectionInternal(DetectEngineThreadCtx *det_ctx,
         struct DetectEngineContentInspectionCtx *ctx, const Signature *s, const SigMatchData *smd,
         Packet *p, Flow *f, const uint8_t *buffer, const uint32_t buffer_len,
-        const uint32_t stream_start_offset, const uint8_t flags,
+        const uint64_t stream_start_offset, const uint8_t flags,
         const enum DetectContentInspectionType inspection_mode)
 {
     SCEnter();
@@ -732,7 +732,7 @@ final_match:
  */
 bool DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
         const Signature *s, const SigMatchData *smd, Packet *p, Flow *f, const uint8_t *buffer,
-        const uint32_t buffer_len, const uint32_t stream_start_offset, const uint8_t flags,
+        const uint32_t buffer_len, const uint64_t stream_start_offset, const uint8_t flags,
         const enum DetectContentInspectionType inspection_mode)
 {
     struct DetectEngineContentInspectionCtx ctx = { .recursion.count = 0,
index fe53086badd998eb6afabb1b7e93538469e43555..740482a113f9949784f9aa5e9fa958c1adb02606 100644 (file)
@@ -51,7 +51,7 @@ enum DetectContentInspectionType {
 /* implicit "public" just returns true match, false no match */
 bool DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
         const Signature *s, const SigMatchData *smd, Packet *p, Flow *f, const uint8_t *buffer,
-        const uint32_t buffer_len, const uint32_t stream_start_offset, const uint8_t flags,
+        const uint32_t buffer_len, const uint64_t stream_start_offset, const uint8_t flags,
         const enum DetectContentInspectionType inspection_mode);
 
 /** \brief content inspect entry for inspection buffers