]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util/debug: increase max length of message
authorEric Leblond <el@stamus-networks.com>
Fri, 29 Nov 2024 17:46:11 +0000 (18:46 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 28 Jan 2025 21:34:26 +0000 (22:34 +0100)
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

index cb22e9097389294d77336e9d8c6b72e6ee1866f3..29beb912c927d08024770f0d36793fc239d54226 100644 (file)
@@ -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