Commit cd1b13fb authored by Dimi Paun's avatar Dimi Paun Committed by Alexandre Julliard

Validate the column index passed in by the caller.

parent 7e08a24f
......@@ -5613,6 +5613,7 @@ static BOOL LISTVIEW_GetSubItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lp
{
POINT Position;
LVITEMW lvItem;
INT nColumn = lprc->top;
if (!lprc) return FALSE;
......@@ -5625,9 +5626,11 @@ static BOOL LISTVIEW_GetSubItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lp
if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE;
if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE;
lvItem.mask = 0;
lvItem.iItem = nItem;
lvItem.iSubItem = lprc->top;
lvItem.iSubItem = nColumn;
if (lvItem.mask && !LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE;
switch(lprc->left)
......
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