comctl32/tab: Check destination pointer for NULL in TCM_GETITEM handler.
This commit is contained in:
parent
4c9405a83c
commit
031c497a5a
|
@ -2810,6 +2810,8 @@ TAB_GetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
|
||||||
|
|
||||||
TRACE("(%p,%d,%p,%s)\n", infoPtr, iItem, tabItem, bUnicode ? "true" : "false");
|
TRACE("(%p,%d,%p,%s)\n", infoPtr, iItem, tabItem, bUnicode ? "true" : "false");
|
||||||
|
|
||||||
|
if (!tabItem) return FALSE;
|
||||||
|
|
||||||
if (iItem < 0 || iItem >= infoPtr->uNumItem)
|
if (iItem < 0 || iItem >= infoPtr->uNumItem)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -835,8 +835,13 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
|
||||||
/* Testing GetSet Item */
|
/* Testing GetSet Item */
|
||||||
{
|
{
|
||||||
TCITEM tcItem;
|
TCITEM tcItem;
|
||||||
|
DWORD ret;
|
||||||
char szText[32] = "New Label";
|
char szText[32] = "New Label";
|
||||||
|
|
||||||
|
/* TCM_GETITEM with null dest pointer */
|
||||||
|
ret = SendMessage(hTab, TCM_GETITEM, 0, (LPARAM)NULL);
|
||||||
|
expect(FALSE, ret);
|
||||||
|
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
|
|
||||||
tcItem.mask = TCIF_TEXT;
|
tcItem.mask = TCIF_TEXT;
|
||||||
|
|
Loading…
Reference in New Issue