* 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:
2016-08-01 18:52:34 +01:00
parent e37f50d5d3
commit f5e90756a2
9 changed files with 87 additions and 34 deletions

View File

@@ -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;