From: Philippe Antoine Date: Thu, 19 Sep 2019 14:54:44 +0000 (+0200) Subject: http: disable lzma decompression from configuration X-Git-Tag: suricata-5.0.0-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c09ad018360a82d21a75dd6d59d940ad2ac10d5e;p=thirdparty%2Fsuricata.git http: disable lzma decompression from configuration --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 55f9a7a949..65a3591141 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -2702,6 +2702,12 @@ static void HTPConfigParseParameters(HTPCfgRec *cfg_prec, ConfNode *s, /* set default soft-limit with our new hard limit */ SCLogConfig("Setting HTTP LZMA memory limit to %"PRIu32" bytes", limit); htp_config_set_lzma_memlimit(cfg_prec->cfg, (size_t)limit); +#endif +#ifdef HAVE_HTP_CONFIG_SET_LZMA_MEMLIMIT + } else if (strcasecmp("lzma-enabled", p->name) == 0) { + if (ConfValIsFalse(p->val)) { + htp_config_set_lzma_memlimit(cfg_prec->cfg, 0); + } #endif } else if (strcasecmp("randomize-inspection-sizes", p->name) == 0) { if (!g_disable_randomness) { diff --git a/suricata.yaml.in b/suricata.yaml.in index 5b75b426bb..9934761583 100644 --- a/suricata.yaml.in +++ b/suricata.yaml.in @@ -977,6 +977,7 @@ app-layer: # LZMA decompression memory limit. #lzma-memlimit: 1 Mb + #lzma-enabled: yes server-config: