From: rcombs Date: Wed, 17 Sep 2014 00:29:19 +0000 (-0400) Subject: fixed valgrind issues X-Git-Tag: 3.0.0-233~1411^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f68809bdeba2978fc6e321f3af30b693af1cd811;p=thirdparty%2Fsnort3.git fixed valgrind issues --- diff --git a/lua/snort.lua b/lua/snort.lua index 5d007a479..5d046c6d7 100644 --- a/lua/snort.lua +++ b/lua/snort.lua @@ -82,8 +82,8 @@ alert tcp any any -> any 80 ( http_method; content:"GIT"; gid:1; sid:1000051) ips = { --include = '../test.rules', - include = 'rules/active.rules', + --include = 'rules/active.rules', --rules = local_rules, - --enable_builtin_rules = true + enable_builtin_rules = true } diff --git a/src/main/modules.cc b/src/main/modules.cc index c20240810..eaabc4c07 100644 --- a/src/main/modules.cc +++ b/src/main/modules.cc @@ -1659,7 +1659,8 @@ static const char* hosts_help = class HostsModule : public Module { public: - HostsModule() : Module("hosts", hosts_help, hosts_params, true) { }; + HostsModule() : Module("hosts", hosts_help, hosts_params, true) + { app = nullptr; host = nullptr; }; ~HostsModule() { assert(!host && !app); }; bool set(const char*, Value&, SnortConfig*); diff --git a/src/network_inspectors/binder/binder.cc b/src/network_inspectors/binder/binder.cc index 1c5425001..6f78465ac 100644 --- a/src/network_inspectors/binder/binder.cc +++ b/src/network_inspectors/binder/binder.cc @@ -49,6 +49,7 @@ Binding::Binding() when.vlans.set(); when.ports.set(); + when.id = 0; when.role = BR_EITHER; use.action = BA_INSPECT; } diff --git a/src/stream/tcp/tcp_session.cc b/src/stream/tcp/tcp_session.cc index 4c548a0a1..c7dc98639 100644 --- a/src/stream/tcp/tcp_session.cc +++ b/src/stream/tcp/tcp_session.cc @@ -137,7 +137,8 @@ const char* tcp_pegs[] = "gaps", "internal events", "client cleanup flushes", - "server cleanup flushes" + "server cleanup flushes", + nullptr }; THREAD_LOCAL TcpStats tcpStats; @@ -642,6 +643,8 @@ static inline uint16_t GetTcpReassemblyPolicy(int os_policy) // config methods //------------------------------------------------------------------------- + + StreamTcpConfig::StreamTcpConfig() { policy = STREAM_POLICY_DEFAULT; @@ -652,6 +655,14 @@ StreamTcpConfig::StreamTcpConfig() hs_timeout = -1; flags = 0; + flush_factor = 0; + session_on_syn = 0; // FIXIT-L configurable via module? + overlap_limit = 0; + + hs_timeout = 0; + footprint = 0; + paf_max = 16384; + max_queued_bytes = S5_DEFAULT_MAX_QUEUED_BYTES; max_queued_segs = S5_DEFAULT_MAX_QUEUED_SEGS;