diff options
Diffstat (limited to 'protocols/MRA/src')
-rw-r--r-- | protocols/MRA/src/MraOfflineMsg.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraSendCommand.cpp | 8 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/protocols/MRA/src/MraOfflineMsg.cpp b/protocols/MRA/src/MraOfflineMsg.cpp index a5e786a6ba..1495f6d2a2 100644 --- a/protocols/MRA/src/MraOfflineMsg.cpp +++ b/protocols/MRA/src/MraOfflineMsg.cpp @@ -138,7 +138,7 @@ static DWORD PlainText2message(const CMStringA &szContentType, const CMStringA & // Content-Type: text/plain; charset = CP-1251
if ( strstr(szContentType, "utf-16le")) {
// charset = UTF-16LE// предполагаем что оно в base64
- unsigned dwTextSize;
+ size_t dwTextSize;
ptrA lpszText((LPSTR)mir_base64_decode(szBody, &dwTextSize));
if (lpszText) {
plpsText = CMStringA(lpszText, dwTextSize);
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index 32dd012880..54352926ac 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -89,7 +89,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType buf.SetUL(2);
buf.SetLPSW(L"");//***deb possible nick here
buf.SetLPSW(lpwszMessage);
- lpszMessageConverted = mir_base64_encode(buf.Data(), (int)buf.Len());
+ lpszMessageConverted = mir_base64_encode(buf.Data(), buf.Len());
dwMessageConvertedSize = mir_strlen(lpszMessageConverted);
}
// messages with Flash
@@ -109,7 +109,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType DWORD dwBufSize = DWORD(buf.Len() + 128);
lpszBuf.Truncate(dwBufSize);
if (compress2((LPBYTE)(LPCSTR)lpszBuf, &dwBufSize, buf.Data(), (int)buf.Len(), Z_BEST_COMPRESSION) == Z_OK) {
- lpszMessageRTF = mir_base64_encode((LPBYTE)(LPCSTR)lpszBuf, dwBufSize);
+ lpszMessageRTF = mir_base64_encode(lpszBuf, dwBufSize);
dwMessageRTFSize = mir_strlen(lpszMessageRTF);
}
}
@@ -129,7 +129,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType DWORD dwRTFDataSize = lpbRTFData.GetLength();
if (compress2((LPBYTE)(LPCSTR)lpbRTFData, &dwRTFDataSize, buf.Data(), (int)buf.Len(), Z_BEST_COMPRESSION) == Z_OK) {
- lpszMessageRTF = mir_base64_encode((LPBYTE)(LPCSTR)lpbRTFData, dwRTFDataSize);
+ lpszMessageRTF = mir_base64_encode(lpbRTFData, dwRTFDataSize);
dwMessageRTFSize = mir_strlen(lpszMessageRTF);
}
}
@@ -205,7 +205,7 @@ DWORD CMraProto::MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwG buf2.SetUL(2);
buf2.SetLPSW(L"");//***deb possible nick here
buf2.SetLPSW((wszAuthMessage == NULL) ? L"" : *wszAuthMessage);
- buf.SetLPS(CMStringA(ptrA(mir_base64_encode(buf2.Data(), (int)buf2.Len()))));
+ buf.SetLPS(CMStringA(ptrA(mir_base64_encode(buf2.Data(), buf2.Len()))));
buf.SetUL(0);
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 9339d5f94c..dd1768c5c3 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1337,7 +1337,7 @@ bool CMraProto::GetPassDB(CMStringA &res) dwPassSize = (*btCryptedPass);
btCryptedPass[dwPassSize + 1 + MIR_SHA1_HASH_SIZE] = 0;
- unsigned dwDecodedSize;
+ size_t dwDecodedSize;
mir_ptr<BYTE> pDecoded((PBYTE)mir_base64_decode((LPCSTR)&btCryptedPass[1 + MIR_SHA1_HASH_SIZE], &dwDecodedSize));
SHA1GetDigest(pDecoded, dwDecodedSize, btRandomData);
if (0 != memcmp(&btCryptedPass[1], btRandomData, MIR_SHA1_HASH_SIZE))
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 5f48fdac43..0cf552080d 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -1570,7 +1570,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA & // pre processing - extracting/decoding
if (dwFlags & MESSAGE_FLAG_AUTHORIZE) { // extract auth message из обычного текста
- unsigned dwAuthDataSize;
+ size_t dwAuthDataSize;
LPBYTE lpbAuthData = (LPBYTE)mir_base64_decode(plpsText, &dwAuthDataSize);
if (lpbAuthData) {
BinBuffer buf(lpbAuthData, dwAuthDataSize);
@@ -1607,7 +1607,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA & mir_ptr<BYTE> lpbRTFData((LPBYTE)mir_calloc(dwRFTBuffSize));
if (lpbRTFData) {
- unsigned dwCompressedSize;
+ size_t dwCompressedSize;
mir_ptr<BYTE> lpbCompressed((LPBYTE)mir_base64_decode(plpsRFTText, &dwCompressedSize));
DWORD dwRTFDataSize = (DWORD)dwRFTBuffSize;
if (uncompress(lpbRTFData, &dwRTFDataSize, lpbCompressed, dwCompressedSize) == Z_OK) {
|