Pārlūkot izejas kodu

scsi: fix mac vendor page

In SCSI2SD 4.1.1 circa 2015 c09e15b there was a bug introduced that incorrectly checked the allocation length of the Apple Vendor page. This worked as it was silently truncating the response. But did cause the vendor string to always be sent even if Apple Quirks was disabled.
Alex Perez 1 gadu atpakaļ
vecāks
revīzija
8904bba58f
1 mainītis faili ar 0 papildinājumiem un 1 dzēšanām
  1. 0 1
      lib/SCSI2SD/src/firmware/mode.c

+ 0 - 1
lib/SCSI2SD/src/firmware/mode.c

@@ -560,7 +560,6 @@ static void doModeSense(
 	idx += modeSenseCDCapabilitiesPage(pc, idx, pageCode, &pageFound);
 
 	if ((scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) &&
-	    (idx + sizeof(AppleVendorPage) <= allocLength) &&
 		(pageCode == 0x30 || pageCode == 0x3F))
 	{
 		pageFound = 1;