summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-17 01:40:55 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-17 01:40:55 +0000
commit7edfacbff885285d233095d8979dd8e93718b1a0 (patch)
tree4f7978d3bcbb804f103e3cb819e1f15f6eeb19d0 /IntelFrameworkModulePkg
parentd595d4b13a272fb2cee55b5a30bb826a42ddfad5 (diff)
downloadedk2-platforms-7edfacbff885285d233095d8979dd8e93718b1a0.tar.xz
Fix build broken issue for ICC 9.0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8960 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c2
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
index 97e808c60a..5fb764c297 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
@@ -1050,7 +1050,7 @@ BOpt_GetBootOptions (
}
if (HiiString != NULL) {
- NewLoadContext->Description = AllocateZeroPool(StrSize((UINT16*)LoadOptionPtr) + StrSize(HiiString));
+ NewLoadContext->Description = AllocateZeroPool(StringSize + StrSize(HiiString));
StrCpy (NewLoadContext->Description, HiiString);
if (StrnCmp ((UINT16*)LoadOptionPtr, L"0", 1) != 0) {
StrCat (NewLoadContext->Description, L" ");
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
index fcf6c7bb36..817b2e0e0b 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
@@ -204,6 +204,7 @@ CallBootManager (
CHAR16 *HiiString;
CHAR16 *BootStringNumber;
UINTN DevicePathType;
+ UINTN BufferSize;
gOption = NULL;
InitializeListHead (&BdsBootOptionList);
@@ -312,7 +313,9 @@ CallBootManager (
//
if (HiiString != NULL) {
BootStringNumber = Option->Description;
- Option->Description = AllocateZeroPool(StrSize(BootStringNumber) + StrSize(HiiString));
+ BufferSize = StrSize(BootStringNumber);
+ BufferSize += StrSize(HiiString);
+ Option->Description = AllocateZeroPool(BufferSize);
StrCpy (Option->Description, HiiString);
if (StrnCmp (BootStringNumber, L"0", 1) != 0) {
StrCat (Option->Description, L" ");