diff options
Diffstat (limited to 'protocols/Skype/src/skype.cpp')
-rw-r--r-- | protocols/Skype/src/skype.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp index ad23c7c14e..f2b22adf17 100644 --- a/protocols/Skype/src/skype.cpp +++ b/protocols/Skype/src/skype.cpp @@ -124,7 +124,7 @@ unsigned char decode(char * data, unsigned char *buf, int len) }
}
#undef BASE64DECODE_READ_NEXT_CHAR
- +
unsigned char *decode(char * data, int *outlen)
{
if ( !data) { *outlen = 0; return (unsigned char*)""; }
@@ -142,15 +142,15 @@ char* LoadKeyPair() if (hRes) {
HGLOBAL hResource = LoadResource(g_hInstance, hRes);
if (hResource) {
- aes_context ctx; - + aes_context ctx;
+
int basedecodedkey = decodeSize((char*)MY_KEY);
unsigned char *tmpK = (unsigned char*)malloc(basedecodedkey + 1);
decode((char*)MY_KEY, tmpK, basedecodedkey);
tmpK[basedecodedkey] = 0;
- - - aes_set_key( &ctx, tmpK, 128); +
+
+ aes_set_key( &ctx, tmpK, 128);
int dwResSize = SizeofResource(g_hInstance, hRes);
char *pData = (char*)GlobalLock(hResource);
char *pCopy = (char*)_alloca(dwResSize+1);
@@ -165,7 +165,7 @@ char* LoadKeyPair() aes_decrypt(&ctx, tmpD+i, bufD+i);
}
mir_free(tmpD);
- bufD[basedecoded] = 0; //cert should be null terminated + bufD[basedecoded] = 0; //cert should be null terminated
return (char*)bufD;
}
return NULL;
|