]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Ssl::CertValidationResponse::RecvdError::error_depth may used uninitialized
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 5 Jan 2016 10:55:14 +0000 (12:55 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 5 Jan 2016 10:55:14 +0000 (12:55 +0200)
The Ssl::CertValidationResponse::RecvdError::error_depth is not initialized
inside copy constructor and inside "=" operator.

This class member added with the patch 14443:
    "%ssl::<cert_errors logformat code part2: provide depth information"

Detected by Coverity Scan. Issue 1346999

src/ssl/cert_validate_message.cc

index 8983b20a977a1d2376e0a636955db8d988c6b226..7c2249ed617cb9a5261af21a8c7ab15ee7d612c8 100644 (file)
@@ -199,6 +199,7 @@ Ssl::CertValidationResponse::RecvdError::RecvdError(const RecvdError &old)
     id = old.id;
     error_no = old.error_no;
     error_reason = old.error_reason;
+    error_depth = old.error_depth;
     setCert(old.cert.get());
 }
 
@@ -207,6 +208,7 @@ Ssl::CertValidationResponse::RecvdError & Ssl::CertValidationResponse::RecvdErro
     id = old.id;
     error_no = old.error_no;
     error_reason = old.error_reason;
+    error_depth = old.error_depth;
     setCert(old.cert.get());
     return *this;
 }