From cefe6e6a1627fc5e5d39e0d5f6f613f587ba7064 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Tue, 1 May 2012 13:39:01 +0530 Subject: [PATCH] bug 456 fix for byte_extract to have array of the right size to update values with --- src/detect-engine.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/detect-engine.c b/src/detect-engine.c index cdc69fa..e36ad5f 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -448,7 +448,7 @@ TmEcode DetectEngineThreadCtxInit(ThreadVars *tv, void *initdata, void **data) { /* this detection engine context belongs to this thread instance */ det_ctx->tv = tv; - det_ctx->bj_values = SCMalloc(sizeof(*det_ctx->bj_values) * byte_extract_max_local_id); + det_ctx->bj_values = SCMalloc(sizeof(*det_ctx->bj_values) * (byte_extract_max_local_id + 1)); if (det_ctx->bj_values == NULL) { return TM_ECODE_FAILED; } -- 1.7.1