mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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;
|
MENUITEMINFOW MenuItemInfoW;
|
||||||
|
|
||||||
RtlCopyMemory(&MenuItemInfoW, lpmii, min(lpmii->cbSize, sizeof(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,
|
return NtUserMenuItemInfo(hMenu, uItem, fByPosition,
|
||||||
(PROSMENUITEMINFO)&MenuItemInfoW, TRUE);
|
(PROSMENUITEMINFO)&MenuItemInfoW, TRUE);
|
||||||
|
|
Loading…
Reference in a new issue