diff options
author | George Hazan <ghazan@miranda.im> | 2020-12-06 18:47:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-12-06 18:47:00 +0300 |
commit | f571dabb896633c6dbfda0837ca87e4b4832f7a4 (patch) | |
tree | 58c9ade885d47e3bb2cdebecf511e88a76aebb77 /src | |
parent | 0cd7f4957164cd57be2e9689c3f7759abc7c1e01 (diff) |
fixes #2638 (crash in netlib)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/netlib_openconn.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mir_app/src/netlib_openconn.cpp b/src/mir_app/src/netlib_openconn.cpp index 7f118f9dc2..a0a45e7f16 100644 --- a/src/mir_app/src/netlib_openconn.cpp +++ b/src/mir_app/src/netlib_openconn.cpp @@ -846,14 +846,15 @@ MIR_APP_DLL(int) Netlib_StartSsl(HNETLIBCONN hConnection, const char *szHost) NetlibUser *nlu = nlc->nlu; if (szHost == nullptr) szHost = nlc->nloc.szHost; + szHost = NEWSTR_ALLOCA(szHost); - Netlib_Logf(nlu, "(%d %s) Starting SSL negotiation", nlc->s, szHost); - nlc->hSsl = sslApi.connect(nlc->s, szHost, nlu->settings.validateSSL); + Netlib_Logf(nlu, "(%d %s) Starting SSL negotiation", int(nlc->s), szHost); + nlc->hSsl = sslApi.connect(nlc->s, szHost, nlu->settings.validateSSL); if (nlc->hSsl == nullptr) - Netlib_Logf(nlu, "(%d %s) Failure to negotiate SSL connection", nlc->s, szHost); + Netlib_Logf(nlu, "(%d %s) Failure to negotiate SSL connection", int(nlc->s), szHost); else - Netlib_Logf(nlu, "(%d %s) SSL negotiation successful", nlc->s, szHost); + Netlib_Logf(nlu, "(%d %s) SSL negotiation successful", int(nlc->s), szHost); return nlc->hSsl != nullptr; } |