]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix uninitialized member fields in Http* objects
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 17 Feb 2013 02:24:54 +0000 (15:24 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 17 Feb 2013 02:24:54 +0000 (15:24 +1300)
 Detected by Coverity Scan. Issues 740516, 740519, 740520, 740620

src/HttpHdrRange.cc
src/HttpHeaderTools.h
src/HttpRequest.cc

index 479e4f8e2529d0658dbfcb30e14c51c972061c6d..a47fdae4a29a2e5d2d49dcee0d58e330cdfb562d 100644 (file)
@@ -224,7 +224,7 @@ HttpHdrRangeSpec::mergeWith(const HttpHdrRangeSpec * donor)
  * Range
  */
 
-HttpHdrRange::HttpHdrRange () : clen (HttpHdrRangeSpec::UnknownPosition)
+HttpHdrRange::HttpHdrRange() : clen(HttpHdrRangeSpec::UnknownPosition)
 {}
 
 HttpHdrRange *
@@ -285,7 +285,9 @@ HttpHdrRange::~HttpHdrRange()
         delete specs.pop_back();
 }
 
-HttpHdrRange::HttpHdrRange(HttpHdrRange const &old) : specs()
+HttpHdrRange::HttpHdrRange(HttpHdrRange const &old) :
+        specs(),
+        clen(HttpHdrRangeSpec::UnknownPosition)
 {
     specs.reserve(old.specs.size());
 
index bdaf6f7da6741a4c3a6d0d8c0d816815d397305c..d5ba1e888e7b38ca0e98d2cf1cb37fb025266e2a 100644 (file)
@@ -77,7 +77,7 @@ private:
 class HeaderWithAcl
 {
 public:
-    HeaderWithAcl() :  aclList(NULL), fieldId (HDR_BAD_HDR), quoted(false) {}
+    HeaderWithAcl() : valueFormat(NULL), aclList(NULL), fieldId(HDR_BAD_HDR), quoted(false) {}
 
     /// HTTP header field name
     std::string fieldName;
index 7acdca5cd08ce0f3a467238125e210700050974e..308c072ab2aa19e548b06c4bba701bf0c3518265 100644 (file)
@@ -116,6 +116,7 @@ HttpRequest::init()
     errDetail = ERR_DETAIL_NONE;
     peer_login = NULL;         // not allocated/deallocated by this class
     peer_domain = NULL;                // not allocated/deallocated by this class
+    peer_host = NULL;
     vary_headers = NULL;
     myportname = null_string;
     tag = null_string;