summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_functions.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-04 08:11:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-04 08:11:14 +0000
commit60404a7dc490b6f4a505ae23d23e277b49ad6d06 (patch)
tree288a5f2517bfe4fde82a548f36dbf42a1d0fe7e0 /protocols/MRA/src/Mra_functions.cpp
parentd8acc357113997aed7eaffe627b341d9895893e1 (diff)
further MRA cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5935 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_functions.cpp')
-rw-r--r--protocols/MRA/src/Mra_functions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 079904ea72..b388e7af40 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -1379,10 +1379,10 @@ bool CMraProto::GetPassDB_v1(CMStringA &res)
RC4(btCryptedPass, sizeof(btCryptedPass), bthmacSHA1, MIR_SHA1_HASH_SIZE);
dwPassSize = (*btCryptedPass);
- btCryptedPass[dwPassSize] = 0;
+ btCryptedPass[dwPassSize+1+MIR_SHA1_HASH_SIZE] = 0;
unsigned dwDecodedSize;
- mir_ptr<BYTE> pDecoded((PBYTE)mir_base64_decode((LPCSTR)&btCryptedPass[(1+MIR_SHA1_HASH_SIZE)], &dwDecodedSize));
+ mir_ptr<BYTE> pDecoded((PBYTE)mir_base64_decode((LPCSTR)&btCryptedPass[1+MIR_SHA1_HASH_SIZE], &dwDecodedSize));
SHA1GetDigest(pDecoded, dwDecodedSize, btRandomData);
if ( !memcmp(&btCryptedPass[1], btRandomData, MIR_SHA1_HASH_SIZE)) {
res = CMStringA((LPSTR)(PBYTE)pDecoded, dwDecodedSize);