Revision: 14637
http://sourceforge.net/p/edk2/code/14637
Author: vanjeff
Date: 2013-09-10 05:15:47 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
Sync patches r14044, r14046 and r14510 from main trunk.
1. Use EFI_IFR_TYPE_VALUE type variable instead of UINT64 to avoid buffer
overflow.
2. Clean the flag before use it to avoid use old error value.
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/14044
http://sourceforge.net/p/edk2/code/14046
http://sourceforge.net/p/edk2/code/14510
Modified Paths:
--------------
branches/UDK2010.SR1/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
branches/UDK2010.SR1/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
Modified: branches/UDK2010.SR1/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
===================================================================
--- branches/UDK2010.SR1/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
2013-09-10 03:17:16 UTC (rev 14636)
+++ branches/UDK2010.SR1/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
2013-09-10 05:15:47 UTC (rev 14637)
@@ -947,7 +947,7 @@
UINT16 Offset;
UINT16 Width;
UINT64 VarValue;
- UINT64 TmpValue;
+ EFI_IFR_TYPE_VALUE TmpValue;
LIST_ENTRY *Link;
UINT8 *VarBuffer;
UINTN MaxBufferSize;
@@ -1512,9 +1512,10 @@
//
// Check current value is the value of one of option.
//
- TmpValue = 0;
+ ASSERT (IfrOneOfOption->Type <= EFI_IFR_TYPE_NUM_SIZE_64);
+ ZeroMem (&TmpValue, sizeof (EFI_IFR_TYPE_VALUE));
CopyMem (&TmpValue, &IfrOneOfOption->Value,
IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
- if (VarValue == TmpValue) {
+ if (VarValue == TmpValue.u64) {
//
// The value is one of option value.
// Set OpCode to Zero, don't need check again.
Modified:
branches/UDK2010.SR1/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
===================================================================
--- branches/UDK2010.SR1/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
2013-09-10 03:17:16 UTC (rev 14636)
+++ branches/UDK2010.SR1/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
2013-09-10 05:15:47 UTC (rev 14637)
@@ -882,6 +882,7 @@
GuidStr = NULL;
NameStr = NULL;
TempStr = NULL;
+ *IsEfiVarstore = FALSE;
Status = GetFormPackageData(DataBaseRecord, &HiiFormPackage, &PackageSize);
if (EFI_ERROR (Status)) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits