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 ebf031e780
commit 93baf690cd

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.",