audk/MdeModulePkg/Universal/Variable/RuntimeDxe
Star Zeng d5aef955b9 MdeModulePkg VariableSmm: Check InfoSize correctly
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=290

Current SmmVariableGetStatistics() in VariableSmm.c is always
checking input InfoSize against the first variable info,
it is incorrect.

For instance, there are three variables.
BootOrder
Boot0000
Boot0001

If the input InfoEntry is holding the second variable info (Boot0000)
and InfoSize is sizeof (VARIABLE_INFO_ENTRY) + StrSize (L"Boot0000"),
current code will return EFI_BUFFER_TOO_SMALL, but it should return
the third variable info (Boot0001).

This patch is to refine the code logic.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-12 09:55:37 +08:00
..
Measurement.c MdeModulePkg Variable: Merge from Auth Variable driver in SecurityPkg 2015-07-01 03:08:29 +00:00
Reclaim.c MdeModulePkg Variable: Merge from Auth Variable driver in SecurityPkg 2015-07-01 03:08:29 +00:00
TcgMorLockDxe.c MdeModulePkg: Add MorLockDxe to variable driver. 2016-01-19 13:21:18 +00:00
TcgMorLockSmm.c MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
VarCheck.c MdeModulePkg Variable: Consume the separated VarCheckLib 2015-08-25 03:01:56 +00:00
Variable.c MdeModulePkg/Variable/RuntimeDxe: rebase to ARRAY_SIZE() 2016-10-27 11:10:58 +02:00
Variable.h MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
VariableDxe.c MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
VariableExLib.c MdeModulePkg Variable: Read MonotonicCount by ReadUnaligned64() 2015-07-27 00:49:00 +00:00
VariableRuntimeDxe.inf MdeModulePkg: Update Guid/Protocol usages in INF files. 2016-04-13 14:52:59 +08:00
VariableRuntimeDxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
VariableRuntimeDxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
VariableSmm.c MdeModulePkg VariableSmm: Check InfoSize correctly 2016-12-12 09:55:37 +08:00
VariableSmm.inf MdeModulePkg: Use IsZeroGuid API for zero GUID checking 2016-08-31 11:14:01 +08:00
VariableSmm.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
VariableSmmExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
VariableSmmRuntimeDxe.c MdeModulePkg Variable: Merge from Auth Variable driver in SecurityPkg 2015-07-01 03:08:29 +00:00
VariableSmmRuntimeDxe.inf MdeModulePkg Variable: Merge from Auth Variable driver in SecurityPkg 2015-07-01 03:08:29 +00:00
VariableSmmRuntimeDxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
VariableSmmRuntimeDxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00