diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-29 13:06:19 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-29 13:06:19 +0000 |
commit | 09d28fc1befa980c24d25c093528599683bdc432 (patch) | |
tree | eda1b27650713ea1deb6241af930c68c5451a944 /protocols/JabberG/src/jabber_secur.cpp | |
parent | b58c63bcd7d19440100d78126a4aacf4dce706e8 (diff) |
Jabber:
- fix for a crash in vcard parsing;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_secur.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 307a5df5d4..126bed41e9 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -281,18 +281,19 @@ char* TScramAuth::getChallenge(const TCHAR *challenge) e = strchr(in, ','); if (e) *e = 0;
int ind = atoi(in + 2);
- if (e) *e = ',';
+ if (e)
+ *e = ',';
- ptrA passw( mir_utf8encodeT(info->password));
+ ptrA passw(mir_utf8encodeT(info->password));
size_t passwLen = strlen(passw);
- BYTE saltedPassw[ MIR_SHA1_HASH_SIZE ];
- Hi(saltedPassw, passw, passwLen, salt, saltLen, ind);
+ BYTE saltedPassw[MIR_SHA1_HASH_SIZE];
+ Hi(saltedPassw, passw, passwLen, salt, saltLen, ind);
- BYTE clientKey[ MIR_SHA1_HASH_SIZE ];
+ BYTE clientKey[MIR_SHA1_HASH_SIZE];
mir_hmac_sha1(clientKey, saltedPassw, sizeof(saltedPassw), (BYTE*)"Client Key", 10);
- BYTE storedKey[ MIR_SHA1_HASH_SIZE ];
+ BYTE storedKey[MIR_SHA1_HASH_SIZE];
mir_sha1_ctx ctx;
mir_sha1_init(&ctx);
|