From: Amos Jeffries Date: Sat, 3 Aug 2013 04:15:04 +0000 (+1200) Subject: Cleanup: initialize all member of AnyP::PortCfg X-Git-Tag: SQUID_3_5_0_1~673 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a97126cc77fd6995e9f3ed7fe55bb61fe5c40c25;p=thirdparty%2Fsquid.git Cleanup: initialize all member of AnyP::PortCfg Detected by Coverity Scan. Issue 1058883. --- diff --git a/src/anyp/PortCfg.cc b/src/anyp/PortCfg.cc index a63ca960cb..7442d3d565 100644 --- a/src/anyp/PortCfg.cc +++ b/src/anyp/PortCfg.cc @@ -18,13 +18,50 @@ int HttpSockets[MAXTCPLISTENPORTS]; AnyP::PortCfg::PortCfg() : next(NULL), + s(), transport(AnyP::PROTO_HTTP,1,1), // "Squid is an HTTP proxy", etc. name(NULL), - defaultsite(NULL) + defaultsite(NULL), + flags(), + allow_direct(false), + vhost(false), + actAsorigin(false), + ignore_cc(false), + connection_auth_disabled(false), + vport(0), + disable_pmtu_discovery(0), + listenConn() #if USE_SSL - ,dynamicCertMemCacheSize(std::numeric_limits::max()) + ,cert(NULL), + key(NULL), + version(0), + cipher(NULL), + options(NULL), + clientca(NULL), + cafile(NULL), + capath(NULL), + crlfile(NULL), + dhfile(NULL), + sslflags(NULL), + sslContextSessionId(NULL), + generateHostCertificates(false), + dynamicCertMemCacheSize(std::numeric_limits::max()), + staticSslContext(), + signingCert(), + signPkey(), + certsToChain(), + untrustedSigningCert(), + untrustedSignPkey(), + clientVerifyCrls(), + clientCA(), + dhParams(), + contextMethod(), + sslContextFlags(0), + sslOptions(0) #endif -{} +{ + memset(&tcp_keepalive, 0, sizeof(tcp_keepalive)); +} AnyP::PortCfg::~PortCfg() {