Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a...@intel.com> Reviewed-by: Jeff Fan <jeff....@intel.com> --- .../Universal/BdsDxe/BootMngr/BootManager.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index dc13648..6efd783 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -1,7 +1,7 @@ /** @file 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 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 @@ -205,11 +205,11 @@ CallBootManager ( EFI_STRING_ID Token; EFI_INPUT_KEY Key; CHAR16 *HelpString; + UINTN HelpSize; EFI_STRING_ID HelpToken; UINT16 *TempStr; EFI_HII_HANDLE HiiHandle; EFI_BROWSER_ACTION_REQUEST ActionRequest; - UINTN TempSize; VOID *StartOpCodeHandle; VOID *EndOpCodeHandle; EFI_IFR_GUID_LABEL *StartLabel; @@ -318,11 +318,11 @@ CallBootManager ( Token = HiiSetString (HiiHandle, 0, Option->Description, NULL); TempStr = DevicePathToStr (Option->DevicePath); - TempSize = StrSize (TempStr); - HelpString = AllocateZeroPool (TempSize + StrSize (L"Device Path : ")); + HelpSize = StrSize (TempStr) + StrSize (L"Device Path : "); + HelpString = AllocateZeroPool (HelpSize); ASSERT (HelpString != NULL); - StrCat (HelpString, L"Device Path : "); - StrCat (HelpString, TempStr); + StrCatS (HelpString, HelpSize / sizeof (CHAR16), L"Device Path : "); + StrCatS (HelpString, HelpSize / sizeof (CHAR16), TempStr); HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL); -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel