mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.DiscImages/DiskCopy42.cs:
Lisa Twiggies and Macintosh Twiggies use a different track order. Detect a Macintosh File System to know which re-ordering to use. * DiscImageChef.Filesystems/AppleMFS/Dir.cs: Remove spurious debug leftover. "Entries are always an integral number of words" solved. * DiscImageChef.Filesystems/AppleMFS/Super.cs: When filling volume block map, check we are not going out of bounds. * DiscImageChef.Partitions/NeXT.cs: * DiscImageChef.Filesystems/HPFS.cs: * DiscImageChef.Filesystems/SysV.cs: Do not try to read past device.
This commit is contained in:
@@ -84,9 +84,16 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
blockMap = new uint[volMDB.drNmAlBlks + 2 + 1];
|
||||
for(int i = 2; i < volMDB.drNmAlBlks + 2; i+=8)
|
||||
{
|
||||
uint tmp1 = BigEndianBitConverter.ToUInt32(blockMapBytes, offset);
|
||||
uint tmp2 = BigEndianBitConverter.ToUInt32(blockMapBytes, offset + 4);
|
||||
uint tmp3 = BigEndianBitConverter.ToUInt32(blockMapBytes, offset + 8);
|
||||
uint tmp1 = 0;
|
||||
uint tmp2 = 0;
|
||||
uint tmp3 = 0;
|
||||
|
||||
if(offset + 4 <= blockMapBytes.Length)
|
||||
tmp1 = BigEndianBitConverter.ToUInt32(blockMapBytes, offset);
|
||||
if(offset + 4 + 4 <= blockMapBytes.Length)
|
||||
tmp2 = BigEndianBitConverter.ToUInt32(blockMapBytes, offset + 4);
|
||||
if(offset + 8 + 4 <= blockMapBytes.Length)
|
||||
tmp3 = BigEndianBitConverter.ToUInt32(blockMapBytes, offset + 8);
|
||||
|
||||
if(i < blockMap.Length)
|
||||
blockMap[i] = (tmp1 & 0xFFF00000) >> 20;
|
||||
|
||||
Reference in New Issue
Block a user