Author: ros-arm-bringup
Date: Sat Jul 11 16:03:28 2009
New Revision: 41869
URL:
http://svn.reactos.org/svn/reactos?rev=41869&view=rev
Log:
Fix incorrect use of PVOID for pointer math, hidden by bad typecasts...
Modified:
trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/ex…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] Sat Jul 11 16:03:28 2009
@@ -606,7 +606,7 @@
{
return FALSE;
}
- RtlCopyMemory(Ext2SuperBlock, (PVOID)(DISKREADBUFFER + 1024), 1024);
+ RtlCopyMemory(Ext2SuperBlock, (PVOID)((ULONG_PTR)DISKREADBUFFER + 1024), 1024);
DPRINTM(DPRINT_FILESYSTEM, "Dumping super block:\n");
@@ -951,7 +951,7 @@
}
// Copy the data to their buffer
- RtlCopyMemory(InodeBuffer, (PVOID)(ULONG_PTR)(FILESYSBUFFER + (InodeOffsetInBlock *
EXT3_INODE_SIZE(Ext2SuperBlock))), sizeof(EXT2_INODE));
+ RtlCopyMemory(InodeBuffer, (PVOID)((ULONG_PTR)FILESYSBUFFER + (InodeOffsetInBlock *
EXT3_INODE_SIZE(Ext2SuperBlock))), sizeof(EXT2_INODE));
DPRINTM(DPRINT_FILESYSTEM, "Dumping inode information:\n");
DPRINTM(DPRINT_FILESYSTEM, "i_mode = 0x%x\n", InodeBuffer->i_mode);