/* don't convert + to space by default */
htp_config_set_plusspace_decode(cfg_prec->cfg, HTP_DECODER_URLENCODED, 0);
-
+#ifdef HAVE_HTP_CONFIG_SET_LZMA_MEMLIMIT
+ htp_config_set_lzma_memlimit(cfg_prec->cfg,
+ HTP_CONFIG_DEFAULT_LZMA_MEMLIMIT);
+#endif
/* libhtp <= 0.5.9 doesn't use soft limit, but it's impossible to set
* only the hard limit. So we set both here to the (current) htp defaults.
* The reason we do this is that if the user sets the hard limit in the
"from conf file cannot be 0.");
}
/* set default soft-limit with our new hard limit */
- htp_config_set_lzma_memlimit(cfg_prec->cfg,
- (size_t)limit);
+ SCLogConfig("Setting HTTP LZMA memory limit to %"PRIu32" bytes", limit);
+ htp_config_set_lzma_memlimit(cfg_prec->cfg, (size_t)limit);
#endif
} else if (strcasecmp("randomize-inspection-sizes", p->name) == 0) {
if (!g_disable_randomness) {
#define HTP_CONFIG_DEFAULT_FIELD_LIMIT_SOFT 9000U
#define HTP_CONFIG_DEFAULT_FIELD_LIMIT_HARD 18000U
+/* default libhtp lzma limit, taken from libhtp. */
+#define HTP_CONFIG_DEFAULT_LZMA_MEMLIMIT 1048576U
+
#define HTP_CONFIG_DEFAULT_RANDOMIZE 1
#define HTP_CONFIG_DEFAULT_RANDOMIZE_RANGE 10