From: Pierre Schweitzer Date: Sat, 5 Apr 2014 15:39:09 +0000 (+0000) Subject: [VFATLIB] X-Git-Tag: backups/0.3.17@66124~1849 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=9f2427ba20ad2fe2ab6117a715c2bf32179fda00 [VFATLIB] --MagicValues; svn path=/trunk/; revision=62625 --- diff --git a/reactos/lib/fslib/vfatlib/fat12.c b/reactos/lib/fslib/vfatlib/fat12.c index b9f8bad46f2..da0e0ae4741 100644 --- a/reactos/lib/fslib/vfatlib/fat12.c +++ b/reactos/lib/fslib/vfatlib/fat12.c @@ -72,7 +72,7 @@ Fat12WriteBootSector(IN HANDLE FileHandle, /* Copy FAT16 BPB to new bootsector */ memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], - 59); /* FAT16 BPB length (up to (not including) Res2) */ + FIELD_OFFSET(FAT16_BOOT_SECTOR, Res2) - FIELD_OFFSET(FAT16_BOOT_SECTOR, OEMName)); /* FAT16 BPB length (up to (not including) Res2) */ /* Write the boot sector signature */ NewBootSector->Signature1 = 0xAA550000; diff --git a/reactos/lib/fslib/vfatlib/fat16.c b/reactos/lib/fslib/vfatlib/fat16.c index 8cd7551d938..8f4d89202b4 100644 --- a/reactos/lib/fslib/vfatlib/fat16.c +++ b/reactos/lib/fslib/vfatlib/fat16.c @@ -72,7 +72,7 @@ Fat16WriteBootSector(IN HANDLE FileHandle, /* Copy FAT16 BPB to new bootsector */ memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], - 59); /* FAT16 BPB length (up to (not including) Res2) */ + FIELD_OFFSET(FAT16_BOOT_SECTOR, Res2) - FIELD_OFFSET(FAT16_BOOT_SECTOR, OEMName)); /* FAT16 BPB length (up to (not including) Res2) */ /* Write the boot sector signature */ NewBootSector->Signature1 = 0xAA550000; diff --git a/reactos/lib/fslib/vfatlib/fat32.c b/reactos/lib/fslib/vfatlib/fat32.c index cd1cfaf7209..17f13e27c5a 100644 --- a/reactos/lib/fslib/vfatlib/fat32.c +++ b/reactos/lib/fslib/vfatlib/fat32.c @@ -72,7 +72,7 @@ Fat32WriteBootSector(IN HANDLE FileHandle, /* Copy FAT32 BPB to new bootsector */ memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], - 87); /* FAT32 BPB length (up to (not including) Res2) */ + FIELD_OFFSET(FAT32_BOOT_SECTOR, Res2) - FIELD_OFFSET(FAT32_BOOT_SECTOR, OEMName)); /* FAT32 BPB length (up to (not including) Res2) */ /* Write the boot sector signature */ NewBootSector->Signature1 = 0xAA550000;