From b4de4369eb32b5b8855030841f382a2b6bb3be43 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sun, 3 Feb 2019 08:18:28 -0500 Subject: [PATCH] Fix favicon corruption on loading database * Fix #2251 and Fix #2674 * Icons stored with duplicate UUID's will be assigned a new UUID on load. This causes entries using the duplicate UUID to display the default icon. --- src/format/KdbxXmlReader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/format/KdbxXmlReader.cpp b/src/format/KdbxXmlReader.cpp index 50c320118..84d597bdb 100644 --- a/src/format/KdbxXmlReader.cpp +++ b/src/format/KdbxXmlReader.cpp @@ -367,6 +367,10 @@ void KdbxXmlReader::parseIcon() } if (uuidSet && iconSet) { + // Check for duplicate UUID (corruption) + if (m_meta->containsCustomIcon(uuid)) { + uuid = QUuid::createUuid(); + } m_meta->addCustomIcon(uuid, icon); return; }