diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-16 17:07:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-16 17:07:51 +0000 |
commit | 72e702d5e19a2b3627ebeb0bb3b462ab3994b135 (patch) | |
tree | 5c85eb3b57ed625230fdc397aafe7187394d77ee /plugins/Db3x_mmap | |
parent | 26de8d3e88b95ea33128d19e9654db5149d41de3 (diff) |
temporary fix for the wrong keys
git-svn-id: http://svn.miranda-ng.org/main/trunk@6922 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap')
-rw-r--r-- | plugins/Db3x_mmap/src/dbcrypt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index 42907f46d1..047eaf6cc8 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -59,6 +59,7 @@ int CDb3Base::InitCrypt() dbv.type = DBVT_BLOB;
dbcgs.szSetting = "StoredKey";
if (GetContactSetting(NULL, &dbcgs)) {
+LBL_SetNewKey:
m_crypto->generateKey(); // unencrypted key
BYTE *pKey = (BYTE*)_alloca(iKeyLength);
@@ -74,7 +75,7 @@ int CDb3Base::InitCrypt() }
else {
if (dbv.cpbVal != (WORD)iKeyLength)
- return 4;
+ goto LBL_SetNewKey;
m_crypto->setKey(dbv.pbVal, iKeyLength);
FreeVariant(&dbv);
|