diff options
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);
|