From 23e6b9ae263b3489d2153d42d2b111f712a19281 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 29 Nov 2024 18:46:11 +0100 Subject: [PATCH] util/debug: increase max length of message When a signature is incorrect, its full content is logged in a message with some other information such as rules file name. As a result, the log message must be longer than a maximum signature length which is 8192. Ticket: 7419 --- src/util-debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util-debug.h b/src/util-debug.h index cb22e9097389..29beb912c927 100644 --- a/src/util-debug.h +++ b/src/util-debug.h @@ -80,8 +80,8 @@ typedef enum { #define SC_LOG_DEF_LOG_FORMAT_REL_CONFIG "[%i] %d: %S: %M" #define SC_LOG_DEF_LOG_FORMAT_DEBUG "%d: %S: %M [%n:%f:%l]" -/* The maximum length of the log message */ -#define SC_LOG_MAX_LOG_MSG_LEN 2048 +/* The maximum length of the log message: we add max rule size and other info */ +#define SC_LOG_MAX_LOG_MSG_LEN 8192 + PATH_MAX + 512 /* The maximum length of the log format */ #define SC_LOG_MAX_LOG_FORMAT_LEN 128