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
Please register or sign in to comment