diff --git a/Library/OcAppleKernelLib/KernelReader.c b/Library/OcAppleKernelLib/KernelReader.c index 23e55bf9..6f1213f0 100644 --- a/Library/OcAppleKernelLib/KernelReader.c +++ b/Library/OcAppleKernelLib/KernelReader.c @@ -145,6 +145,9 @@ ParseFatArchitecture ( UINT32 FileSize; Status = GetFileSize (File, &FileSize); + if (EFI_ERROR (Status)) { + return Status; + } if (BufferSize >= FileSize) { return EFI_INVALID_PARAMETER; }