diff options
author | George Hazan <ghazan@miranda.im> | 2020-08-01 20:40:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-08-01 20:40:24 +0300 |
commit | bb75c498eba5e6914638369ba5829ad35929eb1a (patch) | |
tree | e0a0fa49b7cac83f5305a7c918706553d6d16642 /protocols | |
parent | a0a533448ea54ed18535687af264b792bd8d83b2 (diff) |
Jabber: fix for the context size calculation
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index fa55ce43a5..fc397cdbc7 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -297,11 +297,11 @@ char* TScramAuth::getChallenge(const char *challenge) unsigned int len;
HMAC(hashMethod, saltedPassw, hashMethod->md_size, (BYTE*)"Client Key", 10, clientKey, &len);
- BYTE storedKey[EVP_MAX_MD_SIZE], md[EVP_MAX_MD_SIZE];
+ BYTE storedKey[EVP_MAX_MD_SIZE];
EVP_MD_CTX pctx = {};
pctx.digest = hashMethod;
- pctx.md_data = md;
+ pctx.md_data = _alloca(hashMethod->ctx_size);
hashMethod->init(&pctx);
hashMethod->update(&pctx, clientKey, hashMethod->md_size);
hashMethod->final(&pctx, storedKey);
|