summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Variable
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-12 08:24:10 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-12 08:24:10 +0000
commitd294b9a4b7ec9cbf96bf8975d9d0ca04386f8e3a (patch)
tree91f1c1f6b863d014cdec6d714e08604754a7c284 /MdeModulePkg/Universal/Variable
parent7ca126ff309053656ff4846c53430c9c58a79cd3 (diff)
downloadedk2-platforms-d294b9a4b7ec9cbf96bf8975d9d0ca04386f8e3a.tar.xz
MdeModulePkg/VariableSmm: Fix a VariableSmm bug when reading variable with size 0.
Signed-off-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Zhang, Chao <chao.b.zhang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13725 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable')
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c2
1 files changed, 1 insertions, 1 deletions
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;
}