audk/MdeModulePkg/Universal
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
..
Acpi MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
BdsDxe MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier 2016-12-08 10:11:01 +08:00
BootManagerPolicyDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
CapsulePei MdeModulePkg: Display new stack base and size 2016-11-09 16:00:04 +08:00
CapsuleRuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Console MdeModulePkg/TerminalDxe: Fix IA32 VS2015x86 build break 2016-10-27 11:29:52 -07:00
DebugPortDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DebugSupportDxe MdeModulePkg DebugSupportDxe: Convert X64/AsmFuncs.asm to NASM 2016-06-28 09:51:57 +08:00
DevicePathDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Disk MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
DisplayEngineDxe MdeModulePkg: Clear the buffer after using it 2016-11-25 10:50:27 +08:00
DriverHealthManagerDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DriverSampleDxe MdeModulePkg/DriverSample: Remove the password related codes 2016-11-25 10:50:27 +08:00
EbcDxe MdeModulePkg/EbcDxe: Fix incorrect Copyright format 2016-12-09 10:38:36 +08:00
EsrtDxe MdeModulePkg/Esrt: Add ESRT_FW_TYPE_SYSTEMFIRMWARE check. 2016-11-08 22:37:03 +08:00
FaultTolerantWriteDxe MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
FaultTolerantWritePei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
FileExplorerDxe MdeModulePkg FileExplorerDxe: Change file format which has mixed file format. 2015-12-16 03:22:39 +00:00
FvSimpleFileSystemDxe MdeModulePkg/FvSimpleFileSystem: fix assertions when FV is empty 2016-08-03 09:48:18 +08:00
HiiDatabaseDxe MdeModulePkg HiiDatabase: Remove extra memory initialization. 2016-11-17 17:32:35 +08:00
HiiResourcesSampleDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
LegacyRegion2Dxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
LoadFileOnFv2 MdeModulePkg LoadFileOnFv2: Correct the parameter name in function comment 2016-10-25 11:53:59 +08:00
LockBox/SmmLockBox MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
MemoryTest MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
Metronome MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
MonotonicCounterRuntimeDxe MdeModulePkg: Minor comments update to GetNextHighMonotonicCount() 2016-01-29 09:26:49 +00:00
Network MdeModulePkg: Fix assert in iSCSI. 2016-12-07 16:13:11 +08:00
PCD MdeModulePkg/PCD: Fix PcdGetNextToken may get a wrong PCD token 2016-11-03 11:00:52 +08:00
PcatSingleSegmentPciCfg2Pei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PlatformDriOverrideDxe MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
PrintDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PropertiesTableAttributesDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
RegularExpressionDxe MdeModulePkg/RegularExpressionDxe: remove module-local ARRAY_SIZE macro 2016-10-27 10:50:09 +02:00
ReportStatusCodeRouter MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
ResetSystemRuntimeDxe MdeModulePkg/ResetSystemRuntimeDxe: Support EfiResetPlatformSpecific 2016-09-02 10:07:17 +08:00
SectionExtractionDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SectionExtractionPei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SecurityStubDxe MdeModulePkg/SecurityStubDxe: Report failure if image is load earlier 2016-11-10 15:58:00 +08:00
SerialDxe MdeModulePkg/SerialDxe: Set FIFO depth with PCD 2016-03-29 15:00:30 +08:00
SetupBrowserDxe MdeModulePkg/SetupBrowserDxe: Fix incorrect local variable used 2016-12-06 18:41:43 +08:00
SmbiosDxe MdeModulePkg SmbiosDxe: Use definition in IndustryStandard/Smbios.h 2016-07-29 10:10:56 +08:00
SmbiosMeasurementDxe MdeModulePkg SmbiosMeasurementDxe: Add NominalSpeed in Type 27 to black list 2016-09-02 10:16:39 +08:00
SmmCommunicationBufferDxe MdeModulePkg: Add new driver to publish EDKII_PI_SMM_COMMUNICATION_REGION_TABLE. 2016-04-29 12:49:09 +08:00
StatusCodeHandler MdeModulePkg/MemoryStatusCode: Expose the DXE memory status code table. 2016-06-29 09:46:51 +08:00
TimestampDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Variable MdeModulePkg VariableSmm: Check InfoSize correctly 2016-12-12 09:55:37 +08:00
WatchdogTimerDxe MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00