]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg PCD: Fix TmpTokenSpaceBufferCount not assigned correctly
authorStar Zeng <star.zeng@intel.com>
Thu, 18 May 2017 08:34:37 +0000 (16:34 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 19 May 2017 03:32:11 +0000 (11:32 +0800)
When DynamicEx PCD is only used in PEI code, but not DXE code,
current implementation of DxePcdGetNextTokenSpace does not assign
TmpTokenSpaceBufferCount correctly, but leaves it as initial value,
then DxePcdGetNextTokenSpace may return incorrect token space guid
and status.

This patch is to fix this issue.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/PCD/Dxe/Pcd.c

index 9d710bbf1fb7e72d62dbf345e9c026ae7d0f7941..326644c53105cb312fa28455af3218c11c70d688 100644 (file)
@@ -1296,6 +1296,7 @@ DxePcdGetNextTokenSpace (
                             (EFI_GUID *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->GuidTableOffset)\r
                             );\r
       CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);\r
+      TmpTokenSpaceBufferCount = PeiTokenSpaceTableSize;\r
       FreePool (PeiTokenSpaceTable);\r
     }\r
 \r