audk/MdeModulePkg
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
..
Application MdeModulePkg/CapsuleApp: add Internal for function name. 2016-12-01 19:07:52 +08:00
Bus MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers 2016-12-09 14:51:36 +00:00
Core MdeModulePkg/PiSmmCore: use EfiPagesToSize to prevent build error. 2016-12-07 13:13:54 +08:00
Include MdeModulePkg: introduce helper library to register non-discoverable devices 2016-12-07 09:01:27 +00:00
Library MdeModulePkg: introduce helper library to register non-discoverable devices 2016-12-07 09:01:27 +00:00
Logo MdeModulePkg/Logo: rebase to ARRAY_SIZE() 2016-10-27 11:10:57 +02:00
Universal MdeModulePkg VariableSmm: Check InfoSize correctly 2016-12-12 09:55:37 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec MdeModulePkg: introduce helper library to register non-discoverable devices 2016-12-07 09:01:27 +00:00
MdeModulePkg.dsc MdeModulePkg: implement generic PCI I/O driver for non-discoverable devices 2016-12-07 09:45:56 +00:00
MdeModulePkg.uni MdeModulePkg: Add PcdPciDegradeResourceForOptionRom prompt&help to UNI 2016-10-25 10:52:44 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00