branch update for HEAD-2003091401
[reactos.git] / subsys / system / usetup / bootsup.c
index c9af78c..a792f3b 100644 (file)
@@ -922,8 +922,8 @@ CHECKPOINT1;
 
 
 NTSTATUS
-InstallMBRBootCodeToDisk(PWSTR SrcPath,
-                          PWSTR RootPath)
+InstallMbrBootCodeToDisk (PWSTR SrcPath,
+                         PWSTR RootPath)
 {
   OBJECT_ATTRIBUTES ObjectAttributes;
   IO_STATUS_BLOCK IoStatusBlock;
@@ -1030,7 +1030,9 @@ InstallMBRBootCodeToDisk(PWSTR SrcPath,
   }
 
   /* Copy partition table from old MBR to new */
-  memcpy((NewBootSector + 446), (OrigBootSector + 446), 4*16 /* Length of partition table */);
+  RtlCopyMemory ((NewBootSector + 446),
+                (OrigBootSector + 446),
+                4*16 /* Length of partition table */);
 
   /* Free the original boot sector */
   RtlFreeHeap(ProcessHeap, 0, OrigBootSector);
@@ -1188,8 +1190,10 @@ InstallFat16BootCodeToDisk(PWSTR SrcPath,
     return(Status);
   }
 
-  /* Adjust bootsector (copy a part of the FAT BPB) */
-  memcpy((NewBootSector + 11), (OrigBootSector + 11), 51 /*fat BPB length*/);
+  /* Adjust bootsector (copy a part of the FAT16 BPB) */
+  memcpy((NewBootSector + 3),
+        (OrigBootSector + 3),
+        59);  /* FAT16 BPB length*/
 
   /* Free the original boot sector */
   RtlFreeHeap(ProcessHeap, 0, OrigBootSector);