Skip to content
Commit c9254f34 authored by Grzegorz Kowal's avatar Grzegorz Kowal Committed by Daniel Vrátil
Browse files

Fix array access bounds in IMAP resource

Summary:
ImapQuotaAttribute::serialized() processes IMAP roots assigning corresponding QUOTA and USAGE attributes to each root. It uses three dictionaries: mRoots, mLimits, and mUsages assuming that these dictionaries always have the same number of  elements. In a case when mRoots contains more elements than other two dictionaries, this causes referencing to non-existent elements in mLimits and mUsages and segfaults.

Fix this by using mLimits.size() and mUsages.size() in corresponding loops.

BUG: 396980

Reviewers: #kde_pim, dvratil

Reviewed By: #kde_pim, dvratil

Subscribers: mlaurent, cfeck, kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D14554
parent 33c70d20
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