Fix double-free crash in BSecureSocket when cert. verification fails

* BSecureSocket::CertificateVerificationFailed() took a BCertificate
  instance by value as parameter.
  BCertificate deletes internal data in its destructor. Passing an
  object by value creates a copy, so the copy attempted to delete
  the internal data again during its destruction.
  This caused mail_daemon to crash here when it came across a failed
  certificate.

* Fix: pass BCertificate object as reference.
This commit is contained in:
Julian Harnath
2014-02-22 02:09:55 +00:00
parent 2eccf32862
commit c99d7ea45c
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ public:
BSecureSocket(const BSecureSocket& other);
virtual ~BSecureSocket();
virtual bool CertificateVerificationFailed(BCertificate);
virtual bool CertificateVerificationFailed(BCertificate&);
// BSocket implementation