Fix SCSI INQUIRY decoding when length doesn't take in account first bytes.

This commit is contained in:
2018-12-24 04:15:49 +00:00
parent 11023e624b
commit 2519ee2a91

View File

@@ -67,7 +67,7 @@ namespace DiscImageChef.Decoders.SCSI
return null;
}
if(SCSIInquiryResponse.Length < SCSIInquiryResponse[4] + 5)
if(SCSIInquiryResponse.Length < SCSIInquiryResponse[4] + 5 && SCSIInquiryResponse.Length != SCSIInquiryResponse[4])
{
DicConsole.DebugWriteLine("SCSI INQUIRY decoder",
"INQUIRY response length ({0} bytes) is different than specified in length field ({1} bytes), decoded data can be incorrect, not decoding.",