You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The socket destructor unconditionally calls this->close(), and that checks:
if(pSSL && pContext) {
SSL_xxx(...)
}
Unfortunately these fields are pointers that aren't initialised to a value unless you connect() the socket first. So, destructing an unconnected socket with SSL enabled will most likely result in trying to pass garbage pointers to openSSL and causing a crash.
A simple fix is just to set them to nullptr either at the declaration site or in the constructor. They also need to be set to zero when moved from, similar to this getaddrinfo_results fix.
The text was updated successfully, but these errors were encountered:
The socket destructor unconditionally calls
this->close()
, and that checks:Unfortunately these fields are pointers that aren't initialised to a value unless you
connect()
the socket first. So, destructing an unconnected socket with SSL enabled will most likely result in trying to pass garbage pointers to openSSL and causing a crash.A simple fix is just to set them to
nullptr
either at the declaration site or in the constructor. They also need to be set to zero when moved from, similar to thisgetaddrinfo_results
fix.The text was updated successfully, but these errors were encountered: