mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
Fix decoding disc information smaller than 34 bytes. Fixes #675
This commit is contained in:
@@ -55,7 +55,7 @@ namespace Aaru.Decoders.SCSI.MMC
|
||||
{
|
||||
public static StandardDiscInformation? Decode000b(byte[] response)
|
||||
{
|
||||
if(response.Length < 34)
|
||||
if(response.Length < 32)
|
||||
return null;
|
||||
|
||||
if((response[2] & 0xE0) != 0)
|
||||
@@ -100,6 +100,9 @@ namespace Aaru.Decoders.SCSI.MMC
|
||||
Array.Reverse(temp);
|
||||
decoded.DiscBarcode = BitConverter.ToUInt64(temp, 0);
|
||||
|
||||
if(response.Length < 34)
|
||||
return null;
|
||||
|
||||
decoded.DiscApplicationCode = response[32];
|
||||
decoded.OPCTablesNumber = response[33];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user