diff --git a/src/detect-parse.c b/src/detect-parse.c index 177fd4e900..d08ceea8ea 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -486,7 +486,7 @@ static int SigParseOptions(DetectEngineCtx *de_ctx, Signature *s, char *optstr, int ret = 0; SigTableElmt *st = NULL; char optname[64]; - char optvalue[8192] = ""; + char optvalue[DETECT_MAX_RULE_SIZE] = ""; ret = pcre_exec(option_pcre, option_pcre_extra, optstr, strlen(optstr), 0, 0, ov, MAX_SUBSTRINGS); /* if successful, we either have: diff --git a/src/detect.c b/src/detect.c index 809d057bc2..62e253fa28 100644 --- a/src/detect.c +++ b/src/detect.c @@ -283,7 +283,7 @@ char *DetectLoadCompleteSigPath(char *sig_file) int DetectLoadSigFile(DetectEngineCtx *de_ctx, char *sig_file, int *sigs_tot) { Signature *sig = NULL; int good = 0, bad = 0; - char line[8192] = ""; + char line[DETECT_MAX_RULE_SIZE] = ""; size_t offset = 0; int lineno = 0, multiline = 0; diff --git a/src/detect.h b/src/detect.h index e1c24f68c6..439edd1e00 100644 --- a/src/detect.h +++ b/src/detect.h @@ -44,6 +44,8 @@ #define COUNTER_DETECT_ALERTS 1 +#define DETECT_MAX_RULE_SIZE 8192 + /* forward declarations for the structures from detect-engine-sigorder.h */ struct SCSigOrderFunc_; struct SCSigSignatureWrapper_;