mirror of https://github.com/acidanthera/audk.git
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:
parent
e94728b359
commit
eb96e4f281
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue