* FileSystemIDandChk/TODO:

* FileSystemIDandChk/Main.cs:
	* FileSystemIDandChk/README.md:
	* FileSystemIDandChk/FileSystemIDandChk.csproj:
	* FileSystemIDandChk/ImagePlugins/ZZZRawImage.cs:
	  Adds support for RAW (sector by sector) disk images.

	* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
	  Add definitions for BD-R, BD-RE XL and FDFORMAT disk types.

	* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
	  Add bounding checks on ReadSectors()
This commit is contained in:
2014-06-07 23:32:59 +01:00
parent 109ea16b7c
commit 0024671731
7 changed files with 674 additions and 11 deletions

View File

@@ -594,6 +594,12 @@ namespace FileSystemIDandChk.ImagePlugins
public override byte[] ReadSectors(UInt64 sectorAddress, UInt32 length)
{
if (sectorAddress > (ulong)sectorsData.Count - 1)
throw new ArgumentOutOfRangeException("sectorAddress", "Sector address not found");
if (sectorAddress + length > (ulong)sectorsData.Count)
throw new ArgumentOutOfRangeException("length", "Requested more sectors than available");
byte[] data = new byte[1]; // To make compiler happy
bool first = true;
int dataPosition = 0;