mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[WIN32K:NTUSER] Avoid allocating an extra item in IntCloneMenuItems. CORE-14222
This commit is contained in:
parent
de455c4d50
commit
1969094028
1 changed files with 2 additions and 2 deletions
|
@ -778,10 +778,10 @@ IntCloneMenuItems(PMENU Destination, PMENU Source)
|
|||
if(!Source->cItems)
|
||||
return FALSE;
|
||||
|
||||
NewMenuItem = DesktopHeapAlloc(Destination->head.rpdesk, (Source->cItems+1) * sizeof(ITEM));
|
||||
NewMenuItem = DesktopHeapAlloc(Destination->head.rpdesk, Source->cItems * sizeof(ITEM));
|
||||
if(!NewMenuItem) return FALSE;
|
||||
|
||||
RtlZeroMemory(NewMenuItem, (Source->cItems+1) * sizeof(ITEM));
|
||||
RtlZeroMemory(NewMenuItem, Source->cItems * sizeof(ITEM));
|
||||
|
||||
Destination->rgItems = NewMenuItem;
|
||||
|
||||
|
|
Loading…
Reference in a new issue