Merge pull request #1641 from tycho/lto-fixup

KdbxReader::readDatabase: abort if reading magic numbers fails
This commit is contained in:
Janek Bevendorff 2018-03-05 20:31:51 +01:00 committed by GitHub
commit 83974732f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,9 @@ Database* KdbxReader::readDatabase(QIODevice* device, const CompositeKey& key, b
// read KDBX magic numbers // read KDBX magic numbers
quint32 sig1, sig2; quint32 sig1, sig2;
readMagicNumbers(&headerStream, sig1, sig2, m_kdbxVersion); if (!readMagicNumbers(&headerStream, sig1, sig2, m_kdbxVersion)) {
return nullptr;
}
m_kdbxSignature = qMakePair(sig1, sig2); m_kdbxSignature = qMakePair(sig1, sig2);
// mask out minor version // mask out minor version