mirror of
https://github.com/reactos/reactos.git
synced 2024-11-02 12:53:33 +00:00
Only access dwTypeData if the caller pronounced it valid.
svn path=/trunk/; revision=17883
This commit is contained in:
parent
bae216e9d2
commit
17c7dd0144
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue