From b69f4cb5cf964114103812fa8370530d2260fbeb Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 5 Oct 2023 10:25:16 +0200 Subject: [PATCH] detect/pcre: match data is const at match time --- src/detect-pcre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detect-pcre.c b/src/detect-pcre.c index 913d782f4a..848f6b9680 100644 --- a/src/detect-pcre.c +++ b/src/detect-pcre.c @@ -79,7 +79,7 @@ static int pcre2_use_jit = 1; /* \brief Helper function for using pcre2_match with/without JIT */ -static inline int DetectPcreExec(DetectEngineThreadCtx *det_ctx, DetectPcreData *pd, +static inline int DetectPcreExec(DetectEngineThreadCtx *det_ctx, const DetectPcreData *pd, const char *str, const size_t strlen, int start_offset, int options, pcre2_match_data *match) { @@ -182,7 +182,7 @@ int DetectPcrePayloadMatch(DetectEngineThreadCtx *det_ctx, const Signature *s, uint32_t len = 0; PCRE2_SIZE capture_len = 0; - DetectPcreData *pe = (DetectPcreData *)smd->ctx; + const DetectPcreData *pe = (const DetectPcreData *)smd->ctx; if (pe->flags & DETECT_PCRE_RELATIVE) { ptr = payload + det_ctx->buffer_offset; -- 2.47.2