Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8a7c66ec authored by Andreas Hartmetz's avatar Andreas Hartmetz

Prevent index out of range in case of empty or malformed filename

Summary:
Prevent index out of range in case of empty or malformed filename

The Akonadi cache on this computer somehow has an external file missing. Without this change, the IMAP agent crashes on every attempt to start it.

Reviewers: #kde_pim, dvratil

Subscribers: knauss, #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D8968
parent da7a7213
......@@ -95,7 +95,7 @@ QString ExternalPartStorage::resolveAbsolutePath(const QString &filename, bool *
const QString path = basePath
+ QDir::separator()
+ (revPos > 1 ? filename[revPos - 2] : QLatin1Char('0'))
+ filename[revPos - 1]
+ (revPos > 0 ? filename[revPos - 1] : QLatin1Char('0'))
+ QDir::separator()
+ filename;
// If legacy fallback is disabled, return it in any case
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment