IntelFrameworkModulePkg BootMngr: Use safe string functions
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17737 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The platform boot manager reference implementation
|
The platform boot manager reference implementation
|
||||||
|
|
||||||
Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -205,11 +205,11 @@ CallBootManager (
|
|||||||
EFI_STRING_ID Token;
|
EFI_STRING_ID Token;
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
CHAR16 *HelpString;
|
CHAR16 *HelpString;
|
||||||
|
UINTN HelpSize;
|
||||||
EFI_STRING_ID HelpToken;
|
EFI_STRING_ID HelpToken;
|
||||||
UINT16 *TempStr;
|
UINT16 *TempStr;
|
||||||
EFI_HII_HANDLE HiiHandle;
|
EFI_HII_HANDLE HiiHandle;
|
||||||
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
||||||
UINTN TempSize;
|
|
||||||
VOID *StartOpCodeHandle;
|
VOID *StartOpCodeHandle;
|
||||||
VOID *EndOpCodeHandle;
|
VOID *EndOpCodeHandle;
|
||||||
EFI_IFR_GUID_LABEL *StartLabel;
|
EFI_IFR_GUID_LABEL *StartLabel;
|
||||||
@ -318,11 +318,10 @@ CallBootManager (
|
|||||||
Token = HiiSetString (HiiHandle, 0, Option->Description, NULL);
|
Token = HiiSetString (HiiHandle, 0, Option->Description, NULL);
|
||||||
|
|
||||||
TempStr = DevicePathToStr (Option->DevicePath);
|
TempStr = DevicePathToStr (Option->DevicePath);
|
||||||
TempSize = StrSize (TempStr);
|
HelpSize = StrSize (TempStr) + StrSize (L"Device Path : ");
|
||||||
HelpString = AllocateZeroPool (TempSize + StrSize (L"Device Path : "));
|
HelpString = AllocateCopyPool (HelpSize, L"Device Path : ");
|
||||||
ASSERT (HelpString != NULL);
|
ASSERT (HelpString != NULL);
|
||||||
StrCat (HelpString, L"Device Path : ");
|
StrCatS (HelpString, HelpSize / sizeof (CHAR16), TempStr);
|
||||||
StrCat (HelpString, TempStr);
|
|
||||||
|
|
||||||
HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL);
|
HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user