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_ITEM *lpItem;
|
||||
UINT mask = phdi->mask;
|
||||
UINT mask;
|
||||
|
||||
if (!phdi)
|
||||
return FALSE;
|
||||
|
||||
TRACE("[nItem=%d]\n", nItem);
|
||||
|
||||
mask = phdi->mask;
|
||||
if (mask == 0)
|
||||
return TRUE;
|
||||
|
||||
if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue