* DiscImageChef.Filesystems/FAT.cs:

Add sanity check for BPB.

	* DiscImageChef.Filesystems/AppleHFS.cs:
	  Correct calling of Read2048SectorAs512()

	* DiscImageChef.Decoders/CD/Sector.cs:
	* DiscImageChef.Decoders/DiscImageChef.Decoders.csproj:
	  Added CD sector descrambling.
This commit is contained in:
2016-10-08 04:29:04 +01:00
parent c4793223d5
commit eeb313e42d
7 changed files with 276 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ namespace DiscImageChef.Filesystems
return drSigWord != HFSP_MAGIC;
}
mdb_sector = Read2048SectorAs512(imagePlugin, 2 + partitionStart);
mdb_sector = Read2048SectorAs512(imagePlugin, 2 + partitionStart * 4);
drSigWord = BigEndianBitConverter.ToUInt16(mdb_sector, 0);
if(drSigWord == HFS_MAGIC)
@@ -140,12 +140,12 @@ namespace DiscImageChef.Filesystems
}
else
{
mdb_sector = Read2048SectorAs512(imagePlugin, 2 + partitionStart);
mdb_sector = Read2048SectorAs512(imagePlugin, 2 + partitionStart * 4);
drSigWord = BigEndianBitConverter.ToUInt16(mdb_sector, 0);
if(drSigWord == HFS_MAGIC)
{
bb_sector = Read2048SectorAs512(imagePlugin, partitionStart);
bb_sector = Read2048SectorAs512(imagePlugin, partitionStart * 4);
APMFromHDDOnCD = true;
}
else

View File

@@ -1,3 +1,9 @@
2016-10-08 Natalia Portillo <claunia@claunia.com>
* FAT.cs: Add sanity check for BPB.
* AppleHFS.cs: Correct calling of Read2048SectorAs512()
2016-10-07 Natalia Portillo <claunia@claunia.com>
* Dir.cs:

View File

@@ -85,6 +85,9 @@ namespace DiscImageChef.Filesystems
if(bpb_found)
{
if(bpb_sector[0x0D] == 0)
return false;
first_fat_entry = BitConverter.ToUInt32(fat_sector, 0); // Easier to manage
DicConsole.DebugWriteLine("FAT plugin", "fats_no = {0}", fats_no);