Author: hpoussin
Date: Sun May 6 11:35:57 2007
New Revision: 26650
URL:
http://svn.reactos.org/svn/reactos?rev=26650&view=rev
Log:
Fix memory corruption in freeldr
Modified:
trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Sun May 6 11:35:57 2007
@@ -521,7 +521,7 @@
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
LoaderBlock.DrivesAddr = reactos_arc_disk_info;
- LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)(PVOID)&reactos_memory_map, 32) *
sizeof(memory_map_t);
+ LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
ULONG i;
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Sun May 6 11:35:57 2007
@@ -235,7 +235,7 @@
LoaderBlock.CommandLine = reactos_kernel_cmdline;
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
- LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)(PVOID)&reactos_memory_map, 32) *
sizeof(memory_map_t);
+ LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
ULONG i;