diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c index 0a6c872baa..15e55d417e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c @@ -426,7 +426,7 @@ SmmVariableHandler ( return EFI_SUCCESS; } - if (*CommBufferSize < sizeof(SMM_VARIABLE_COMMUNICATE_HEADER) - 1) { + if (*CommBufferSize < SMM_VARIABLE_COMMUNICATE_HEADER_SIZE) { return EFI_SUCCESS; }