/** @file\r
The platform boot manager reference implementation\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
All rights reserved. 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
};\r
\r
/**\r
- This call back funtion is registered with Boot Manager formset.\r
+ This call back function is registered with Boot Manager formset.\r
When user selects a boot option, this call back function will\r
be triggered. The boot option is saved for later processing.\r
\r
}\r
\r
/**\r
- This funtion invokees Boot Manager. If all devices have not a chance to be connected,\r
+ This function invokes Boot Manager. If all devices have not a chance to be connected,\r
the connect all will be triggered. It then enumerate all boot options. If \r
a boot option from the Boot Manager page is selected, Boot Manager will boot\r
from this boot option.\r
CHAR16 *HiiString;\r
CHAR16 *BootStringNumber;\r
UINTN DevicePathType;\r
+ UINTN BufferSize;\r
\r
gOption = NULL;\r
InitializeListHead (&BdsBootOptionList);\r
//\r
if (HiiString != NULL) {\r
BootStringNumber = Option->Description;\r
- Option->Description = AllocateZeroPool(StrSize(BootStringNumber) + StrSize(HiiString));\r
+ BufferSize = StrSize(BootStringNumber);\r
+ BufferSize += StrSize(HiiString);\r
+ Option->Description = AllocateZeroPool(BufferSize);\r
+ ASSERT (Option->Description != NULL);\r
StrCpy (Option->Description, HiiString);\r
if (StrnCmp (BootStringNumber, L"0", 1) != 0) {\r
StrCat (Option->Description, L" ");\r
}\r
\r
//\r
- //Will leave browser, check any reset required change is applied? if yes, reset system\r
+ // Will leave browser, check any reset required change is applied? if yes, reset system\r
//\r
SetupResetReminder ();\r
\r