From 09d28fc1befa980c24d25c093528599683bdc432 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Dec 2013 13:06:19 +0000 Subject: 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 --- protocols/JabberG/src/jabber_secur.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'protocols/JabberG/src/jabber_secur.cpp') 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); -- cgit v1.2.3