]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/pcre: add needed casts
authorEric Leblond <el@stamus-networks.com>
Wed, 11 Jun 2025 13:34:06 +0000 (15:34 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 11 Jun 2025 18:49:19 +0000 (20:49 +0200)
src/detect-pcre.c

index df364902c1a459490d2398e98baee264ab616a62..604b556a800f128a1d3115a617abfe78353fd479 100644 (file)
@@ -176,7 +176,7 @@ static void DetectAlertStoreMatch(DetectEngineThreadCtx *det_ctx, const Signatur
             return;
         }
         SCJbSetStringFromBytes(js, json_key, str_ptr, capture_len);
-        uint32_t js_len = SCJbLen(js);
+        uint32_t js_len = (uint32_t)SCJbLen(js);
         if (js_len > SIG_JSON_CONTENT_ITEM_LEN) {
             SCLogDebug("Captured length is too long for JSON.");
             SCFree(str_ptr);
@@ -437,7 +437,7 @@ static DetectPcreData *DetectPcreParse (DetectEngineCtx *de_ctx,
         }
         if (acap) {
             if (a_set)
-                cut_capture = MIN(cut_capture, (acap - regexstr));
+                cut_capture = MIN(cut_capture, (int)(acap - regexstr));
             else
                 cut_capture = (int)(acap - regexstr);
         }