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_util.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_util.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 77b6b0a91c..d3741151ba 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -289,7 +289,7 @@ char* __stdcall JabberSha1(char* str) if (str == NULL)
return NULL;
- BYTE digest[20];
+ BYTE digest[MIR_SHA1_HASH_SIZE];
mir_sha1_ctx sha;
mir_sha1_init(&sha);
mir_sha1_append(&sha, (BYTE*)str, (int)strlen(str));
@@ -1314,8 +1314,8 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) setByte(AI.hContact, "AvatarType", pictureType);
- char buffer[ 41 ];
- BYTE digest[20];
+ char buffer[2*MIR_SHA1_HASH_SIZE+1];
+ BYTE digest[MIR_SHA1_HASH_SIZE];
mir_sha1_ctx sha;
mir_sha1_init(&sha);
mir_sha1_append(&sha, (BYTE*)res->pData, res->dataLength);
|