Browse code

increasing size of pcre match limit

Mickey Sola authored on 2017/03/02 06:18:27
Showing 4 changed files
... ...
@@ -233,7 +233,7 @@ This option sets the maximum number of icons within a PE to be scanned. This mus
233 233
 This option sets the maximum recursive calls to HWP3 parsing function (default: 16).
234 234
 .TP
235 235
 \fB\-\-pcre-match-limit=#n\fR
236
-Maximum calls to the PCRE match function (default: 10000).
236
+Maximum calls to the PCRE match function (default: 100000).
237 237
 .TP
238 238
 \fB\-\-pcre-recmatch-limit=#n\fR
239 239
 Maximum recursive calls to the PCRE match function (default: 5000).
... ...
@@ -551,7 +551,7 @@ Example
551 551
 # For more information on match_limit, see the PCRE documentation.
552 552
 # Negative values are not allowed.
553 553
 # WARNING: setting this limit too high may severely impact performance.
554
-# Default: 10000
554
+# Default: 100000
555 555
 #PCREMatchLimit 20000
556 556
 
557 557
 # This option sets the maximum recursive calls to the PCRE match function during an instance of regex matching.
... ...
@@ -49,7 +49,7 @@
49 49
 #define CLI_DEFAULT_MAXPARTITIONS       50
50 50
 
51 51
 /* TODO - set better defaults */
52
-#define CLI_DEFAULT_PCRE_MATCH_LIMIT     10000
52
+#define CLI_DEFAULT_PCRE_MATCH_LIMIT     100000
53 53
 #define CLI_DEFAULT_PCRE_RECMATCH_LIMIT  5000
54 54
 #define CLI_DEFAULT_PCRE_MAX_FILESIZE    26214400
55 55
 
... ...
@@ -397,7 +397,7 @@ const struct clam_option __clam_options[] = {
397 397
 
398 398
     { "TimeLimit", "timelimit", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, 0, NULL, 0, OPT_CLAMSCAN, "This clamscan option is currently for testing only. It sets the engine parameter CL_ENGINE_TIME_LIMIT. The value is in milliseconds.", "0" },
399 399
 
400
-    { "PCREMatchLimit", "pcre-match-limit", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, CLI_DEFAULT_PCRE_MATCH_LIMIT, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option sets the maximum calls to the PCRE match function during an instance of regex matching.\nInstances using more than this limit will be terminated and alert the user but the scan will continue.\nFor more information on match_limit, see the PCRE documentation.\nNegative values are not allowed.\nWARNING: setting this limit too high may severely impact performance.", "10000" },
400
+    { "PCREMatchLimit", "pcre-match-limit", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, CLI_DEFAULT_PCRE_MATCH_LIMIT, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option sets the maximum calls to the PCRE match function during an instance of regex matching.\nInstances using more than this limit will be terminated and alert the user but the scan will continue.\nFor more information on match_limit, see the PCRE documentation.\nNegative values are not allowed.\nWARNING: setting this limit too high may severely impact performance.", "100000" },
401 401
 
402 402
     { "PCRERecMatchLimit", "pcre-recmatch-limit", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, CLI_DEFAULT_PCRE_RECMATCH_LIMIT, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option sets the maximum recursive calls to the PCRE match function during an instance of regex matching.\nInstances using more than this limit will be terminated and alert the user but the scan will continue.\nFor more information on match_limit_recursion, see the PCRE documentation.\nNegative values are not allowed and values > PCREMatchLimit are superfluous.\nWARNING: setting this limit too high may severely impact performance.", "5000" },
403 403