mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Only access dwTypeData if the caller pronounced it valid.
svn path=/trunk/; revision=17883
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user