浏览代码

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 年之前
父节点
当前提交
8904bba58f
共有 1 个文件被更改,包括 0 次插入1 次删除
  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;