From: Jeff Lucovsky Date: Sun, 9 Jul 2023 14:43:11 +0000 (-0400) Subject: detect/byte_math: Use proper index for rvalue var X-Git-Tag: suricata-7.0.0~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb847d8bb09bc3f810c4b9e48ce15bc7afde817e;p=thirdparty%2Fsuricata.git detect/byte_math: Use proper index for rvalue var Use the proper index for extracting the rvalue variable value. --- diff --git a/src/detect-engine-content-inspection.c b/src/detect-engine-content-inspection.c index 0ca8b3ee39..6f57ad55f5 100644 --- a/src/detect-engine-content-inspection.c +++ b/src/detect-engine-content-inspection.c @@ -583,7 +583,7 @@ uint8_t DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThrea } uint64_t rvalue; if (bmd->flags & DETECT_BYTEMATH_FLAG_RVALUE_VAR) { - rvalue = det_ctx->byte_values[bmd->local_id]; + rvalue = det_ctx->byte_values[bmd->rvalue]; } else { rvalue = bmd->rvalue; }