[ros-diffs] [cfinck] 33959: Don't use MenuCleanupRosMenuItemInfo for an array of Items allocated on the heap! This function is meant to be used for a single menu item info and just frees the memory allocated for dwTypeInfo. Replaced this with a simple HeapFree call to free the memory for the whole array allocated in MenuGetAllRosMenuItemInfo. Fixes a heap corruption discovered by encoded. See issue #3349 for more details.
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Sat Jun 14 02:00:21 CEST 2008
Author: cfinck
Date: Fri Jun 13 19:00:20 2008
New Revision: 33959
URL: http://svn.reactos.org/svn/reactos?rev=33959&view=rev
Log:
Don't use MenuCleanupRosMenuItemInfo for an array of Items allocated on the heap!
This function is meant to be used for a single menu item info and just frees the memory allocated for dwTypeInfo.
Replaced this with a simple HeapFree call to free the memory for the whole array allocated in MenuGetAllRosMenuItemInfo.
Fixes a heap corruption discovered by encoded.
See issue #3349 for more details.
Modified:
trunk/reactos/dll/win32/user32/windows/menu.c
Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/menu.c?rev=33959&r1=33958&r2=33959&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Fri Jun 13 19:00:20 2008
@@ -3963,7 +3963,7 @@
break;
}
}
- MenuCleanupRosMenuItemInfo(Items);
+ HeapFree(GetProcessHeap(), 0, Items);
*pChecked += cChecked;
*pUnchecked += cUnchecked;
More information about the Ros-diffs
mailing list