mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-29 09:16:29 -05:00
Emit error on invalid HistoryMaxItems and HistoryMaxSize values.
This commit is contained in:
parent
f1ad94b472
commit
f8bea82ce8
@ -219,10 +219,22 @@ void KeePass2XmlReader::parseMeta()
|
|||||||
m_meta->setLastTopVisibleGroup(getGroup(readUuid()));
|
m_meta->setLastTopVisibleGroup(getGroup(readUuid()));
|
||||||
}
|
}
|
||||||
else if (m_xml.name() == "HistoryMaxItems") {
|
else if (m_xml.name() == "HistoryMaxItems") {
|
||||||
m_meta->setHistoryMaxItems(readNumber());
|
int value = readNumber();
|
||||||
|
if (value >= -1) {
|
||||||
|
m_meta->setHistoryMaxItems(value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
raiseError(18);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (m_xml.name() == "HistoryMaxSize") {
|
else if (m_xml.name() == "HistoryMaxSize") {
|
||||||
m_meta->setHistoryMaxSize(readNumber());
|
int value = readNumber();
|
||||||
|
if (value >= -1) {
|
||||||
|
m_meta->setHistoryMaxSize(value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
raiseError(19);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (m_xml.name() == "Binaries") {
|
else if (m_xml.name() == "Binaries") {
|
||||||
parseBinaries();
|
parseBinaries();
|
||||||
|
Loading…
Reference in New Issue
Block a user