/** @file\r
The platform boot manager reference implementation\r
\r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
EFI_STRING_ID Token;\r
EFI_INPUT_KEY Key;\r
CHAR16 *HelpString;\r
+ UINTN HelpSize;\r
EFI_STRING_ID HelpToken;\r
UINT16 *TempStr;\r
EFI_HII_HANDLE HiiHandle;\r
EFI_BROWSER_ACTION_REQUEST ActionRequest;\r
- UINTN TempSize;\r
VOID *StartOpCodeHandle;\r
VOID *EndOpCodeHandle;\r
EFI_IFR_GUID_LABEL *StartLabel;\r
Token = HiiSetString (HiiHandle, 0, Option->Description, NULL);\r
\r
TempStr = DevicePathToStr (Option->DevicePath);\r
- TempSize = StrSize (TempStr);\r
- HelpString = AllocateZeroPool (TempSize + StrSize (L"Device Path : "));\r
+ HelpSize = StrSize (TempStr) + StrSize (L"Device Path : ");\r
+ HelpString = AllocateCopyPool (HelpSize, L"Device Path : ");\r
ASSERT (HelpString != NULL);\r
- StrCat (HelpString, L"Device Path : ");\r
- StrCat (HelpString, TempStr);\r
+ StrCatS (HelpString, HelpSize / sizeof (CHAR16), TempStr);\r
\r
HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL);\r
\r