diff options
Diffstat (limited to 'UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c')
-rw-r--r-- | UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c b/UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c index 2b2d3acb6c..2eb4ae4fba 100644 --- a/UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c +++ b/UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c @@ -255,6 +255,16 @@ MicrocodeRead ( TotalSize = MicrocodeEntryPoint->TotalSize;
}
+ if (ImageIndex == Count + 1) {
+ if (*ImageSize < TotalSize) {
+ *ImageSize = TotalSize;
+ return EFI_BUFFER_TOO_SMALL;
+ }
+ *ImageSize = TotalSize;
+ CopyMem (Image, MicrocodeEntryPoint, TotalSize);
+ return EFI_SUCCESS;
+ }
+
} else {
//
// It is the padding data between the microcode patches for microcode patches alignment.
|