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
This commit is contained in:
erictian 2012-09-12 08:25:25 +00:00
parent d294b9a4b7
commit ad84df72c7
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}