mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/UsbMass: Reject device whose block size is 0 or > 64K
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
8894c90d74
commit
25d310d9b6
|
@ -736,6 +736,13 @@ UsbBootDetectMedia (
|
|||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Simply reject device whose block size is unacceptable small (==0) or large (>64K).
|
||||
//
|
||||
if ((Media->BlockSize == 0) || (Media->BlockSize > USB_BOOT_MAX_CARRY_SIZE)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// Detect whether it is necessary to reinstall the Block I/O Protocol.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue