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:
@@ -20,7 +20,7 @@ public:
|
||||
BSecureSocket(const BSecureSocket& other);
|
||||
virtual ~BSecureSocket();
|
||||
|
||||
virtual bool CertificateVerificationFailed(BCertificate);
|
||||
virtual bool CertificateVerificationFailed(BCertificate&);
|
||||
|
||||
// BSocket implementation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user