From 93baf690cd91e5b0c4a8967b3426513d6d2dd8a6 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 24 Dec 2018 04:15:49 +0000 Subject: [PATCH] Fix SCSI INQUIRY decoding when length doesn't take in account first bytes. --- DiscImageChef.Decoders/SCSI/Inquiry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscImageChef.Decoders/SCSI/Inquiry.cs b/DiscImageChef.Decoders/SCSI/Inquiry.cs index 0073c84b8..09e2224d5 100644 --- a/DiscImageChef.Decoders/SCSI/Inquiry.cs +++ b/DiscImageChef.Decoders/SCSI/Inquiry.cs @@ -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.",