Only access dwTypeData if the caller pronounced it valid.

svn path=/trunk/; revision=17883
This commit is contained in:
Gé van Geldorp 2005-09-16 15:34:19 +00:00
parent bae216e9d2
commit 17c7dd0144

View file

@ -4646,7 +4646,10 @@ SetMenuItemInfoW(
MENUITEMINFOW MenuItemInfoW;
RtlCopyMemory(&MenuItemInfoW, lpmii, min(lpmii->cbSize, sizeof(MENUITEMINFOW)));
if (0 != (MenuItemInfoW.fMask & MIIM_STRING))
{
MenuItemInfoW.cch = wcslen(MenuItemInfoW.dwTypeData);
}
return NtUserMenuItemInfo(hMenu, uItem, fByPosition,
(PROSMENUITEMINFO)&MenuItemInfoW, TRUE);