summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-12 08:25:25 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-12 08:25:25 +0000
commitad84df72c7520dba175bafd246bebd5288456544 (patch)
tree6dad0b7d90879b9b14d8105ab277d5533c087919
parentd294b9a4b7ec9cbf96bf8975d9d0ca04386f8e3a (diff)
downloadedk2-ad84df72c7520dba175bafd246bebd5288456544.zip
edk2-ad84df72c7520dba175bafd246bebd5288456544.tar.gz
edk2-ad84df72c7520dba175bafd246bebd5288456544.tar.bz2
SecurityPkg/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@13726 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c
index de0a32e..c8ee79a 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c
@@ -431,7 +431,7 @@ SmmVariableHandler (
return EFI_SUCCESS;
}
- if (*CommBufferSize < sizeof(SMM_VARIABLE_COMMUNICATE_HEADER) - 1) {
+ if (*CommBufferSize < SMM_VARIABLE_COMMUNICATE_HEADER_SIZE) {
return EFI_SUCCESS;
}