Procházet zdrojové kódy

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 před 1 rokem
rodič
revize
8904bba58f
1 změnil soubory, kde provedl 0 přidání a 1 odebrání
  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;