summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-04 04:39:18 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-04 04:39:18 +0000
commit12373f2cfedc4ba1d4bf3c1c3ce1fda31cb17a0d (patch)
treea300c8816c6126e8031e055d9aa082f990382084
parented2bfecbcd6eed998be628b310bf89705fdb586c (diff)
downloadedk2-12373f2cfedc4ba1d4bf3c1c3ce1fda31cb17a0d.zip
edk2-12373f2cfedc4ba1d4bf3c1c3ce1fda31cb17a0d.tar.gz
edk2-12373f2cfedc4ba1d4bf3c1c3ce1fda31cb17a0d.tar.bz2
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@13486 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 944394b..37b6f11 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c
@@ -290,7 +290,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;
}