mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Filesystems/BFS.cs:
Prevent index out of array on checking BeFS with less-than-sector-size boot sector. * DiscImageChef/Commands/Checksum.cs: Corrected checksum calculation for multiple tracks * DiscImageChef.DiscImages/CDRWin.cs: Corrected typo in track calculation.
This commit is contained in:
@@ -79,8 +79,11 @@ namespace DiscImageChef.Plugins
|
||||
if (magic == BEFS_MAGIC1 || magic_be == BEFS_MAGIC1)
|
||||
return true;
|
||||
|
||||
magic = BitConverter.ToUInt32(sb_sector, 0x220);
|
||||
magic_be = BigEndianBitConverter.ToUInt32(sb_sector, 0x220);
|
||||
if (sb_sector.Length >= 0x400)
|
||||
{
|
||||
magic = BitConverter.ToUInt32(sb_sector, 0x220);
|
||||
magic_be = BigEndianBitConverter.ToUInt32(sb_sector, 0x220);
|
||||
}
|
||||
|
||||
if (magic == BEFS_MAGIC1 || magic_be == BEFS_MAGIC1)
|
||||
return true;
|
||||
@@ -122,7 +125,7 @@ namespace DiscImageChef.Plugins
|
||||
{
|
||||
BigEndianBitConverter.IsLittleEndian &= besb.magic1 != BEFS_CIGAM1;
|
||||
}
|
||||
else
|
||||
else if (sb_sector.Length >= 0x400)
|
||||
{
|
||||
byte[] temp = imagePlugin.ReadSector(0 + partitionStart);
|
||||
besb.magic1 = BigEndianBitConverter.ToUInt32(temp, 0x220);
|
||||
@@ -136,6 +139,8 @@ namespace DiscImageChef.Plugins
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
Array.Copy(sb_sector, 0x000, name_bytes, 0, 0x20);
|
||||
|
||||
Reference in New Issue
Block a user