Fix a buffer overflow bug in VariableSmm driver.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Zhang, Chao <chao.b.zhang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13534 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
sfu5 2012-07-17 08:07:29 +00:00
parent e94728b359
commit eb96e4f281
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ SmmVariableGetStatistics (
}
StatisticsInfoSize = sizeof (VARIABLE_INFO_ENTRY) + StrSize (VariableInfo->Name);
if (*InfoSize < sizeof (VARIABLE_INFO_ENTRY)) {
if (*InfoSize < StatisticsInfoSize) {
*InfoSize = StatisticsInfoSize;
return EFI_BUFFER_TOO_SMALL;
}