mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add several out of bounds and null protections against rogue MMC firmwares.
This commit is contained in:
@@ -228,9 +228,12 @@ namespace DiscImageChef.Commands
|
||||
if(decMode.Value.Header.BlockDescriptors != null && decMode.Value.Header.BlockDescriptors.Length >= 1)
|
||||
scsiDensityCode = (byte)decMode.Value.Header.BlockDescriptors[0].Density;
|
||||
|
||||
containsFloppyPage =
|
||||
decMode.Value.Pages.Aggregate(containsFloppyPage,
|
||||
(current, modePage) => current | (modePage.Page == 0x05));
|
||||
if(decMode.Value.Pages != null)
|
||||
{
|
||||
containsFloppyPage =
|
||||
decMode.Value.Pages.Aggregate(containsFloppyPage,
|
||||
(current, modePage) => current | (modePage.Page == 0x05));
|
||||
}
|
||||
}
|
||||
|
||||
switch(dev.ScsiType)
|
||||
|
||||
Reference in New Issue
Block a user