diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-05 18:27:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-05 18:27:53 +0000 |
commit | a4043c72c431d7654b3756d3b5c897751cb8f4f6 (patch) | |
tree | 9f6715f9ec574bf6eeff4360c57ec66bd7da5cec /plugins/Db3x_mmap/src/dbcrypt.cpp | |
parent | 369e1612ac567185ada1f899c97fde57b6e3c47c (diff) |
special signature added for the encrypted database
git-svn-id: http://svn.miranda-ng.org/main/trunk@7054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcrypt.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbcrypt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index 4cd24f2ee9..179698fb1f 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -167,12 +167,14 @@ LBL_SetNewKey: FreeVariant(&dbv);
}
- if (memcmp(&m_dbHeader.signature, &dbSignature, sizeof(m_dbHeader.signature))) {
+ if (memcmp(&m_dbHeader.signature, &dbSignatureU, sizeof(m_dbHeader.signature)) &&
+ memcmp(&m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature)))
+ {
EnumModuleNames(sttModuleEnum, this);
// upgrade signature
- memcpy(&m_dbHeader.signature, &dbSignature, sizeof(dbSignature));
- DBWrite(0, &dbSignature, sizeof(dbSignature));
+ memcpy(&m_dbHeader.signature, &dbSignatureU, sizeof(dbSignatureU));
+ DBWrite(0, &dbSignatureU, sizeof(dbSignatureU));
}
InitDialogs();
|