OcAppleKernelLib: Add ParseFatArchitecture status check

This commit is contained in:
Goldfish64 2020-08-20 14:19:42 -05:00
parent 5ea634453e
commit 442ec2f2c3

View File

@ -145,6 +145,9 @@ ParseFatArchitecture (
UINT32 FileSize;
Status = GetFileSize (File, &FileSize);
if (EFI_ERROR (Status)) {
return Status;
}
if (BufferSize >= FileSize) {
return EFI_INVALID_PARAMETER;
}