diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/MmCorePerformanceLib.c b/MdeModulePkg/Library/SmmCorePerformanceLib/MmCorePerformanceLib.c index 3dc1c48e26..4ef26f66b7 100644 --- a/MdeModulePkg/Library/SmmCorePerformanceLib/MmCorePerformanceLib.c +++ b/MdeModulePkg/Library/SmmCorePerformanceLib/MmCorePerformanceLib.c @@ -877,7 +877,7 @@ FpdtSmiHandler ( } // Note: Comm size passed to this handler already has OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data) removed. - if ((SmmCommData->BootRecordData == NULL) && (BootRecordSize - BootRecordOffset > TempCommBufferSize - sizeof (SMM_BOOT_RECORD_COMMUNICATE))) { + if ((SmmCommData->BootRecordData == NULL) && (BootRecordSize > TempCommBufferSize - sizeof (SMM_BOOT_RECORD_COMMUNICATE))) { Status = EFI_BUFFER_TOO_SMALL; break; }