mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +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
1 changed files with 4 additions and 1 deletions
|
@ -4646,7 +4646,10 @@ SetMenuItemInfoW(
|
|||
MENUITEMINFOW MenuItemInfoW;
|
||||
|
||||
RtlCopyMemory(&MenuItemInfoW, lpmii, min(lpmii->cbSize, sizeof(MENUITEMINFOW)));
|
||||
MenuItemInfoW.cch = wcslen(MenuItemInfoW.dwTypeData);
|
||||
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