diff options
author | cwu11 <cwu11@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-06 04:20:32 +0000 |
---|---|---|
committer | cwu11 <cwu11@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-06 04:20:32 +0000 |
commit | 3681d193ed5433c142fa05debc2ccb66cbd9b63a (patch) | |
tree | 3ae3f9af89af2b00e9751c7ff5bb6cbcad0e0e7c /EdkModulePkg/Universal | |
parent | 05b52e966543caf1ef30ed0513c8b62173db0fa4 (diff) | |
download | edk2-3681d193ed5433c142fa05debc2ccb66cbd9b63a.tar.gz edk2-3681d193ed5433c142fa05debc2ccb66cbd9b63a.tar.bz2 edk2-3681d193ed5433c142fa05debc2ccb66cbd9b63a.zip |
This check-in fixed the following bugs:
1. Pci22.h EFI_LEGACY_EXPANSION_ROM_HEADER definition error
(MdePkg\Include\IndustryStandard\Pci22.h; Tools\CCode\Source\Include\IndustryStandard\Pci22.h)
2. SetVariable() with DataSize=0xffffffff will cause system hang
(EdkModulePkg\Universal\Variable\RuntimeDxe\Variable.c)
3. Windows XP Pro & XP HOME Fails to Install from Retail CD
(EdkModulePkg\Bus\Pci\Pcibus\Dxe\PciResourceSupport.c)
4. Pci22.h header file needs to add some recent type
(MdePkg\Include\IndustryStandard\Pci22.h; Tools\CCode\Source\Include\IndustryStandard\Pci22.h)
5. Fix issues when ODD cannot boot from Sil0680 PCI-IDE controller
(EdkModulePkg\Bus\Pci\PciBus\Dxe\PciOptionromSupport.c;
EdkModulePkg\Bus\Pci\PciBus\Dxe\PciBus.msa;
EdkModulePkg\ EdkModulePkg.spd)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1900 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal')
-rw-r--r-- | EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 178fa1ea59..5d631a5368 100644 --- a/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -15,7 +15,7 @@ Module Name: Abstract:
- Provide support functions for variable services.
+Revision History
--*/
@@ -125,8 +125,7 @@ Arguments: Returns:
- EFI_INVALID_PARAMETER - Parameters not valid
- EFI_SUCCESS - Variable store successfully updated
+ EFI STATUS
--*/
{
@@ -177,10 +176,11 @@ Returns: if ((DataPtr + DataSize) >= ((UINTN) ((UINT8 *) VolatileBase + VolatileBase->Size))) {
return EFI_INVALID_PARAMETER;
}
-
- //
- // If Volatile Variable just do a simple mem copy.
- //
+ }
+ //
+ // If Volatile Variable just do a simple mem copy.
+ //
+ if (Volatile) {
CopyMem ((UINT8 *) ((UINTN) DataPtr), Buffer, DataSize);
return EFI_SUCCESS;
}
@@ -212,7 +212,9 @@ Returns: &CurrWriteSize,
CurrBuffer
);
- return Status;
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
} else {
Size = (UINT32) (LinearOffset + PtrBlockMapEntry->BlockLength - CurrWritePtr);
Status = EfiFvbWriteBlock (
@@ -813,7 +815,8 @@ Returns: // The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of MAX_VARIABLE_SIZE (1024) bytes.
//
- else if (sizeof (VARIABLE_HEADER) + ArrayLength (VariableName) + DataSize > MAX_VARIABLE_SIZE) {
+ else if ((DataSize > MAX_VARIABLE_SIZE) ||
+ (sizeof (VARIABLE_HEADER) + ArrayLength (VariableName) + DataSize > MAX_VARIABLE_SIZE)) {
return EFI_INVALID_PARAMETER;
}
//
|