Commit def2bb67 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

Return false if index is out of bounds in GetItemT.

parent 82f403bd
......@@ -813,11 +813,10 @@ HEADER_GetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode)
if (phdi->mask == 0)
return TRUE;
if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem))
lpItem = NULL;
else
lpItem = &infoPtr->items[nItem];
return FALSE;
lpItem = &infoPtr->items[nItem];
if (phdi->mask & HDI_BITMAP)
phdi->hbm = (lpItem != NULL) ? lpItem->hbm : 0;
......
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