-
-
Notifications
You must be signed in to change notification settings - Fork 522
Open
Description
The DtlsTransport class is responsible for the ownership of the OpenSSL Context (SSL_CTX*) as well as the SSL* obect. These are allocated in the constructor and freed in the destructor, if they're set.
However, there's currently no protection against a DtlsTransport object being moved, copy constructed, move assigned or copy assigned. Any of these operations would lead to a double free. somce the same SSL_CTX and SSL objects would be freed both when the copied-from object is destructed, but also when the new copy is destructed.
I suggest you add something like this to the header file:
DtlsTransport(DtlsTransport const&) = delete;
DtlsTransport(DtlsTransport&&) = delete;
DtlsTransport& operator=(DtlsTransport const&) = delete;
DtlsTransport& operator=(DtlsTransport&&) = delete;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels