Browse Source

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 year ago
parent
commit
8904bba58f
1 changed files with 0 additions and 1 deletions
  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);
 	idx += modeSenseCDCapabilitiesPage(pc, idx, pageCode, &pageFound);
 
 
 	if ((scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) &&
 	if ((scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) &&
-	    (idx + sizeof(AppleVendorPage) <= allocLength) &&
 		(pageCode == 0x30 || pageCode == 0x3F))
 		(pageCode == 0x30 || pageCode == 0x3F))
 	{
 	{
 		pageFound = 1;
 		pageFound = 1;