mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Checks there is a minimum of sectors.
This commit is contained in:
@@ -60,6 +60,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] mdb_sector = imagePlugin.ReadSector(2 + partitionOffset);
|
||||
UInt16 drSigWord = BigEndianBitConverter.ToUInt16(mdb_sector, 0);
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt16 drSigWord;
|
||||
UInt16 xdrStABNt;
|
||||
UInt16 drAlBlSt;
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace DiscImageChef.Plugins
|
||||
{
|
||||
UInt16 drSigWord;
|
||||
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] mdb_sector = imagePlugin.ReadSector(2 + partitionOffset);
|
||||
|
||||
drSigWord = BigEndianBitConverter.ToUInt16(mdb_sector, 0x000);
|
||||
|
||||
@@ -65,6 +65,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt32 magic;
|
||||
UInt32 magic_be;
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte media_descriptor; // Not present on DOS <= 3, present on TOS but != of first FAT entry
|
||||
byte fats_no; // Must be 1 or 2. Dunno if it can be 0 in the wild, but it CANNOT BE bigger than 2
|
||||
byte[] fat32_signature = new byte[8]; // "FAT32 "
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt32 magic;
|
||||
uint sb_size_in_sectors;
|
||||
byte[] ufs_sb_sectors;
|
||||
|
||||
@@ -54,6 +54,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt32 magic1, magic2;
|
||||
|
||||
byte[] hpfs_sb_sector = imagePlugin.ReadSector(16 + partitionOffset); // Seek to superblock, on logical sector 16
|
||||
|
||||
@@ -75,6 +75,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt16 magic;
|
||||
byte[] minix_sb_sector = imagePlugin.ReadSector(2 + partitionOffset);
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] eigth_bytes = new byte[8];
|
||||
byte signature1, fats_no;
|
||||
UInt16 spfat, signature2;
|
||||
|
||||
@@ -60,6 +60,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
if (imagePlugin.GetSectorSize() < 512)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] sb_sector = imagePlugin.ReadSector(0 + partitionOffset);
|
||||
|
||||
byte record_type;
|
||||
|
||||
@@ -52,6 +52,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] system_descriptor = new byte[23];
|
||||
byte[] sector = imagePlugin.ReadSector(1 + partitionOffset);
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte signature; // 0x29
|
||||
string fs_type; // "SOL_FS "
|
||||
|
||||
|
||||
@@ -68,6 +68,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt32 magic;
|
||||
string s_fname, s_fpack;
|
||||
UInt16 s_nfree, s_ninode;
|
||||
|
||||
@@ -55,6 +55,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
UInt32 magic;
|
||||
|
||||
magic = BitConverter.ToUInt32(imagePlugin.ReadSector(0 + partitionOffset), 0);
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] sb_sector = imagePlugin.ReadSector(2 + partitionOffset);
|
||||
|
||||
UInt16 magic = BitConverter.ToUInt16(sb_sector, 0x038);
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionOffset)
|
||||
{
|
||||
if ((2 + partitionOffset) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte[] sb_sector = imagePlugin.ReadSector(2 + partitionOffset); // Superblock resides at 0x400
|
||||
|
||||
UInt16 magic = BitConverter.ToUInt16(sb_sector, 0x038); // Here should reside magic number
|
||||
|
||||
Reference in New Issue
Block a user