comctl32/header: Check Null before accessing struct member.
This commit is contained in:
parent
f21983cf11
commit
ddf0049e9c
|
@ -1141,15 +1141,17 @@ HEADER_GetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode)
|
||||||
{
|
{
|
||||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
HEADER_ITEM *lpItem;
|
HEADER_ITEM *lpItem;
|
||||||
UINT mask = phdi->mask;
|
UINT mask;
|
||||||
|
|
||||||
if (!phdi)
|
if (!phdi)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRACE("[nItem=%d]\n", nItem);
|
TRACE("[nItem=%d]\n", nItem);
|
||||||
|
|
||||||
|
mask = phdi->mask;
|
||||||
if (mask == 0)
|
if (mask == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem))
|
if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue