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_util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/JabberG/src/jabber_util.cpp') 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); -- cgit v1.2.3