From a4043c72c431d7654b3756d3b5c897751cb8f4f6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 5 Dec 2013 18:27:53 +0000 Subject: special signature added for the encrypted database git-svn-id: http://svn.miranda-ng.org/main/trunk@7054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbheaders.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/Db3x_mmap/src/dbheaders.cpp') diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index 5fe77eb0ba..e7f83996a5 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -54,7 +54,8 @@ int CDb3Base::CreateDbHeaders(const DBSignature& _sign) int CDb3Base::CheckDbHeaders() { - 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)) && memcmp(m_dbHeader.signature, &dbSignatureIM, sizeof(m_dbHeader.signature)) && memcmp(m_dbHeader.signature, &dbSignatureSA, sizeof(m_dbHeader.signature))) return EGROKPRF_UNKHEADER; @@ -65,5 +66,6 @@ int CDb3Base::CheckDbHeaders() if (m_dbHeader.ofsUser == 0) return EGROKPRF_DAMAGED; + m_bEncrypted = 0 == memcmp(m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature)); return 0; } -- cgit v1.2.3