From 617831dfc953a5bba630163c01fbeda11445ee78 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 11 Dec 2017 21:36:29 +0300 Subject: mir_base64_* => parameters type fix --- protocols/MSN/src/msn_auth.cpp | 2 +- protocols/MSN/src/msn_misc.cpp | 6 +++--- protocols/MSN/src/msn_soapab.cpp | 2 +- protocols/MSN/src/msn_srv.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/MSN') diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index df0e2542fe..228792b274 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -543,7 +543,7 @@ CMStringA CMsnProto::HotmailLogin(const char* url) unsigned char nonce[24]; Utils_GetRandom(nonce, sizeof(nonce)); - unsigned key1len; + size_t key1len; mir_ptr key1((BYTE*)mir_base64_decode(hotSecretToken, &key1len)); static const unsigned char encdata[] = "WS-SecureConversation"; diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 5bf2bb2aa3..9a7f7157bf 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -119,7 +119,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) ezxml_t xmli = ezxml_parse_str(NEWSTR_ALLOCA(szContext), mir_strlen(szContext)); const char *szAvatarHash = ezxml_attr(xmli, "SHA1D"); if (szAvatarHash != nullptr) { - unsigned hashLen; + size_t hashLen; mir_ptr hash((BYTE*)mir_base64_decode(szAvatarHash, &hashLen)); if (hash) res = arrayToHex(hash, hashLen); @@ -217,7 +217,7 @@ int CMsnProto::MSN_SetMyAvatar(const wchar_t* sztFname, void* pData, size_t cbLe mir_sha1_append(&sha1ctx, (BYTE*)pData, (int)cbLen); mir_sha1_finish(&sha1ctx, sha1d); - ptrA szSha1d(mir_base64_encode((PBYTE)sha1d, sizeof(sha1d))); + ptrA szSha1d(mir_base64_encode(sha1d, sizeof(sha1d))); mir_sha1_init(&sha1ctx); ezxml_t xmlp = ezxml_new("msnobj"); @@ -250,7 +250,7 @@ int CMsnProto::MSN_SetMyAvatar(const wchar_t* sztFname, void* pData, size_t cbLe mir_sha1_finish(&sha1ctx, sha1c); - ptrA szSha1c(mir_base64_encode((PBYTE)sha1c, sizeof(sha1c))); + ptrA szSha1c(mir_base64_encode(sha1c, sizeof(sha1c))); // ezxml_set_attr(xmlp, "SHA1C", szSha1c); diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 2f82ab7a1c..fa55291a53 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -812,7 +812,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas } if (!msnLoggedIn && msnNsThread) { char *szCircleTicket = ezxml_txt(ezxml_get(body, "CircleResult", 0, "CircleTicket", -1)); - ptrA szCircleTicketEnc(mir_base64_encode((PBYTE)szCircleTicket, (unsigned)mir_strlen(szCircleTicket))); + ptrA szCircleTicketEnc(mir_base64_encode(szCircleTicket, mir_strlen(szCircleTicket))); if (szCircleTicketEnc) msnNsThread->sendPacket("USR", "SHA A %s", szCircleTicketEnc); } diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 35401b533a..35e35259e8 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -296,7 +296,7 @@ void CMsnProto::msn_storeAvatarThread(void* arg) ptrA szEncBuf; if (dat) - szEncBuf = mir_base64_encode(dat->data, (unsigned)dat->dataSize); + szEncBuf = mir_base64_encode(dat->data, dat->dataSize); if (photoid[0] && dat) MSN_StoreUpdateDocument(dat->szName, dat->szMimeType, szEncBuf); -- cgit v1.2.3