1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-07 10:51:45 +00:00

Fix crash caused by a out-of-bounds access in KItemListViewAccessible::cell

BUG: 359738
FIXED-IN: 16.04.0
REVIEW: 127397
This commit is contained in:
Emmanuel Pescosta 2016-03-16 21:16:44 +01:00
parent b101d49bb4
commit 5d6b5d882f

View File

@ -73,8 +73,10 @@ QAccessibleInterface* KItemListViewAccessible::cell(int index) const
return 0;
}
if (m_cells.size() < index - 1)
if (m_cells.size() <= index) {
m_cells.resize(childCount());
}
Q_ASSERT(index < m_cells.size());
QAccessibleInterface* child = m_cells.at(index);
if (!child) {